Question

In: Computer Science

In the following expressions say which, if any, variables are bound (and to which λ), and...

In the following expressions say which, if any, variables are bound (and to which λ), and which are free.

λs.s z λq.s q

(λs. s z) λq. w λw. w q z s

(λs.s) (λq.qs)

λz. (((λs.sq) (λq.qz)) λz. (z z))

Solutions

Expert Solution

i) λs.s z λq.s q

s bound at {s} in λs.s z λq.s q

s free at {s} in λs.s z λq.s q

in λq.{s} q

in {s}

z free at {z} in λs.s {z} λq.s q

in λs.s {z}

in {z}

q bound at {q} in λs.s z λq.s q

in λq.s q

ii) (λs. s z) λq. w λw. w q z s

s bound at {s} in (λs. s z) λq. w λw. w q z s

s free at {s} in (λs. s z) λq. w λw. w q z s

in λq. w λw. w q z {s}

in λw. w q z {s}

in {s}

z free at {z} in (λs. s z) λq. w λw. w q z s

in (λs. s {z}) in {z}

in λw. w q {z} s

in {z}

q bound at {q} in (λs. s z) λq. w λw. w q z s

in λq. w λw. w q z s

q free at {q} in  (λs. s z) λq. w λw. w {q} z s

in  λw. w {q} z s

in {q}

w bound at {w} in (λs. s z) λq. w λw. w q z s

in λw. w q z s

w free at {w} in (λs. s z) λq. {w}λw. w q z s

in λq. {w} λw. w q z s

in λq. {w}

in {w}   

iii) (λs.s) (λq.qs)

s bound at {s} in (λs.s) (λq.qs)

in (λs.s)

s free at {s} in (λs.s) (λq.q{s})

in  λq.q{s}

in {s}

q bound at {q} in (λs.s) (λq.qs)

in λq. q s

iv) λz. (((λs.sq) (λq.qz)) λz. (z z))   

z bound at {z} in λz. (((λs.sq) (λq.q{z)}) λz. (z z))

z free at {z} in λz. (((λs.sq) (λq.q{z)}) λz. (z z))

in  (λs.sq) (λq.q{z})) λz. (z z)

in λq.q{z}

in {z}

s bound at {s} in λz. (((λs.sq) (λq.qz)) λz. (z z))

in (λs.sq)

q bound at {q} in λz. (((λs.sq) (λq.qz)) λz. (z z))

in (λq.qz)

q free at {q} in λz. (((λs.s{q}) (λq.qz)) λz. (z z))

in λs.s{q}

in {q}


Related Solutions

Prove the following using the properties of regular expressions: (ab)* + c + c* = Λ...
Prove the following using the properties of regular expressions: (ab)* + c + c* = Λ + ab + (ab)* + c(Λ + c*)   Λ+ab+abab+ababab(ab)* = Λ + ∅* + (ab)* a(b+c*) + (d+e)* = ab + ac*c* + d + e + (d+e)* a*b + a*a*bc* + d* + ab = d* + ab + a*bc* + Λ a(b+cd*) = a(b+c) + acdd* (a+b)* = ∧* + ∅* + (a*b*)* (ab)*(c*+d*) = (ab)*(c+c*) + (ab)*( ∧ + d*)
1. Let p, q, r, and s be propositional variables. Which of the following expressions would...
1. Let p, q, r, and s be propositional variables. Which of the following expressions would not be formulas in conjunctive normal form? Why? (a) p ∨ p ∨ p (b) p ∧q ∧ r (c) (p ∧ q) ∨ (p ∧ r) (d) ¬p ∧¬p ∧¬p (e) p ∧ q→ p (f) ¬p ∨¬p ∨¬p (g) s (h) ¬(p ∨ q ∨ r) (i) ¬p ∨ q ∨ r (j) (p ∨¬q) ∧ (¬q ∨r) ∧ (¬p ∨s) ∧...
Which of the following variables are discrete variables and which are continuous variables? (a) the number...
Which of the following variables are discrete variables and which are continuous variables? (a) the number of heads showing up in 12 tosses of a coin (b) the number of accidents that occur at a busy intersection in Phoenix (c) the amount of snowfall in Denver during January (d) the lifetime of a car battery
[x, y, and z are integer variables, which expressions are equivalent to each other?] a. (x==y...
[x, y, and z are integer variables, which expressions are equivalent to each other?] a. (x==y && x !=z) || (x!=y && x==z) b. (x==y || x==z) && (x!=y || x!=z) c. (x==y) != (x==z)
Which histone modifications are bound by Bromodomain containing proteins? Which modifications are bound by Chromodomains? Which...
Which histone modifications are bound by Bromodomain containing proteins? Which modifications are bound by Chromodomains? Which are associated with “opening” and which with “closing” of chromatin?
Obtain expressions for the exclusive-OR and the equivalence functions of two variables A and B.
Obtain expressions for the exclusive-OR and the equivalence functions of two variables A and B.
For which values of λ does the system of equations (λ − 2)x + y =...
For which values of λ does the system of equations (λ − 2)x + y = 0 x + (λ − 2)y = 0 have nontrivial solutions? (That is, solutions other than x = y = 0.) For each such λ find a nontrivial solution.
Suppose X1, X2, . . ., Xn are iid Poisson random variables with parameter λ. (a)...
Suppose X1, X2, . . ., Xn are iid Poisson random variables with parameter λ. (a) Find the MVUE for λ. (b) Find the MVUE for λ 2
Problem #2: Use separation of variables with λ = 36 to find a product solution to...
Problem #2: Use separation of variables with λ = 36 to find a product solution to the following partial differential equation, y ∂2u ∂x2  +   ∂u ∂y  =  0 that also satisfies the conditions u(0, 0) = 9 and ux(0, 0) = 4.
Which of the following mathematical expressions is used to compute the materials usage variance?
Which of the following mathematical expressions is used to compute the materials usage variance? a. (Fixed price × Standard quantity) + (Variable price × Actual quantity) b. (Actual price × Standard quantity) + (Actual quantity × Standard price) c. (Average price × Average quantity) – (Standard price × Standard quantity) d. (Standard price × Actual quantity) – (Standard price × Standard quantity) e. None of these choices are correct.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT