issues Total GOOD LUCK! typos in QUIZ 3: 120 Minutes Circle at most one answer per question. 10 points for each correct answer.

Full text

(1)

QUIZ 3: 120 Minutes

Answer ALL questions.

OPEN BOOK (notes, assignments, and textbook) and electronic devices allowed.

NO COLLABORATION or Internet use. Any violations result in an F.

NO questions allowed during the test. Interpret and do the best you can.

GOOD LUCK!

Circle at most one answer per question.

10 points for each correct answer.

You

MUST show CORRECT work

to get full credit.

When in doubt, TINKER.

Total

200

i s s u e s

(2)

1. What is the expected number of times a six appears when a fair die is rolled ten times? A 223 B 1 6 C 123 D 11 3

E None of the above

2. A test has twenty-five multiple-choice questions worth four points each and fifty True-False questions worth two points each. The probability that Katie answers a multiple choice question correctly is 0.8 and for a True-False question this probability is 0.9. What is her expected score on the test?

A 200 B 150 C 100 D 170

E None of the above

3. We roll n fair dice. The i-th dice has xi sides, so takes on one of the values 1, 2, . . . , xi. What is the

expected sum of the values of these n dice? A n 2 + 1 2 Pn i=1xi B n2 +Pni=1xi C 12Pni=1xi D n+1 2

E None of the above

4. X is a random variable that represents a roll of a fair six-sided die. What is the variance of X? A 72 B 71 6 C 494 D 916 E 35 12

5. Which of the following are countable? (I) Z⇥ Z = {(u, v) | u 2 Z and v 2 Z} (II) The set of unrecognizable languages (III) The set of solvable problems

A I & III B I only 1

L e t × ;

=

{1

i f

6

appears

o n

i .t h

roll>

u p .

I

0

otherwise

I

TEX;

=

&

f o r

I - I >

. . . >

1 0

? '

'P'

58

E[{x;]

=

¥

=

12/3

10

i f

a n s w e r

multiple

choicequestioni

correctly,

cop.

¥

M E

{

otherwise,

w-p.

Fo

t i

=

{ &

i f

a n s w e rT - F

question

correctly,

w-p.

§

otherwise,

cop.

o f

0

Escoe-Eµ§5,mit?¥ti)

-40257ft

2050¥

=

80+90

O

r i >

outcome

o f

rolling

dice

i ,

i s

uniformly

dist.

" 7 0

o n

l y. .

- i i .

E r i

= #

(It..

-txi)=¥¥D

=

g a i t

1)

&

E.EE#iE.Eri=zzcxitD=EtIEii

E X

=

f -

(It..

- t

6 )

=

f -

0621=21

algebra

Vari)=E(X-EX)?

§§

(i-g)

2=-4.

=

3512

( I )

i s

countable

bk

o f

t h e

Cantor

diagonalization

argumen

(TI)

i s

t h e

s e t

o f

Turing

deciders,

w h i c h

i s

contained

i n

t h es e t

o f

0

Turing

machines,which

i s

countable,

(3)

C II & III D I & II E I, II, and III

6. Which of the following strings match the regular expression{0, 01}• {1, 10}?

(I) 101110 (II) 00111 (III) 00100 (IV) 01100

A II and IV B III

C all except IV D all except I E all

7. What is the correct relationship between the cardinalities of these sets: (I) A, the set of all languages

(II) I, the interval [0, 1]

(III) C, the set of C programs that compile successfully and halt eventually when run

A |C| = |A| < |I| B |C| = |A| = |I| C |I| < |C| = |A| D |A| = |I|  |C| E |C| < |A| = |I|

8. Consider the following DFA. Which of these strings will it accept: (I) 011011 (II) 100110 (III) 111101 ?

q0 start q1 q2 q3 0, 1 0 1 0 1 0 1 A I & II B II & III C III only D I only E none

( I )

t h e

s e t

o f

recognizable

languages

i s

countable

b y

t h e

s a m e

argumentf o r

(Tt),

a n d

t h e

s e t

o f

a l l

languages

i s

uncountable,

s o

t h e

s e t

o f

unrecognizable

languages

i s

uncountable

r

r

×

L I )

and

(Ft)

a r e

i n

{ o ,

o

13

*

( I i )

i s i n

t h e

language

b e c a u s e 0 0

E

{ 0 > 0 1 3 *

and

I I

l

E

{ I ,

1 0 }

*

-←

u n c o u n t a b l e

uncountable

countable

0

x

x

O

(4)

9. Which is the following claims is true about the languageL = {!#!R#!

| w 2 {0, 1}⇤}?

A Its complement is regular

B It is not decidable but is recognizable C It is context-free

D It is not context-free but is decidable E It can be recognized with a PDA

10. Which of the following languages will not be accepted by this DFA?

q0 start q1 q2 0 1 1 0 0 1 A {00} • {1}⇤ B {00} • {1⇤00}⇤ C {0} • {1}• {0} • {0}• {1} D {100} • {100}⇤ E {0} • {10}• {01}

11. IfL1 andL2are both undecidable but recognizable languages, which of the following are also

recogniz-able: (I)L1 (II)L1\ L2(III)L1[ L2

Hint: Given recognizers forL1andL2, how could you build recognizers for these languages?

A I B I and II C II

D II and III E III

12. How many strings of length four are accepted by this DFA?

q0 start q1 0 1 0 1 A 5 B 6 C 8 D 10 E 12 3

0

(requires

random

a c c e s st o a

memory

t o

solve)

O

e .

g.

0 1 0 1

b u t

n o t

i s i nt h i s

accepted

language

by

t h e

D E A

-

f o r

( I ) ,

r u n

recognizers

ford,

a n d

L z

simultaneously>

b o t hwill

accept

i f

w e

L i n k

@

-

force)>

s o

t h i s

i s

d o

a

t h e

recognizer

same>

and

Atleast

o n e

willaccept

i f

W E L ,

° L 2

ginthatcase

ACCEPT

t h i s

i s

a

recognizer

f o r

L i U L z

Enunerabeandcheck:

- fo r

( I ) ,

i f

I ,

w e r e

0 0 0 0 4

1 0 0 0 g

recognizable

a n d

L ,

w e r e

0 0 0 1 / 1 0 0 1

a s

well,

w e

c o u l d

build

0 0 1 0 4

1 0 1 0X

0 0 1 1 / 1 0 1 1

/

a

decider

f o r

both

8189211892

languages,

s o

conclude

• '

' O x

I l l o x

Ty,

i s not

recognizable

(5)

13. Generate a random two digit binary string by choosing each digit independently and identically, select-ing zero with probability 1/3 and one with probability 2/3. What is the probability that the automaton from the previous problem will accept a string generated in this manner?

A 29 B 49 C 5 9 D 1 3 E 7 9

14. If the complement of a language is countable, which of the following are necessarily true: (I) the language is regular (II) the language is decidable (III) the language is context-free

A all B none C II only D I only E III only

15. Describe the language generated by this CFG.

1: S! A1B

2: A! "|0A

3: B! "|0B|1B

A The set of strings that starts with zero and contains a one B The set of strings with an odd number of zeros

C The set of strings containing a one

D The set of strings with more ones than zeros E None of the above

16. Consider the CFG

1: S! 0|SA

2: A! AA|S1

Which string is in the language described by this CFG? A 10101

B 001 C 011 D 101

E None of the above

17. Which of the following CFGs generates all finite binary strings? (I) S! "|0S|1S

F R E E

P O I N T S

D U E

T O

T Y P O

9.8¥

"÷:%:¥¥::b'"

@

t h i sshould

=

go

23

t

¥ 2

=

F t

¥

=

6g

h a v e

been

6/9

0

a l l

countable

languages

tells

a r e

u s

countable,

nothing

a b o u t

s o

£

L -

being

L

could

h a v e

a l l

o r

n o n e

o f properties

( I )

-

(HI)

¥ 8

geminat

es

98,3¥

*

C F G generates

{03*1

g o,

i f

-0

.

a l l

strings

will

star twith

z e r o .

enumerate t h e

strings

i t

(eliminates

A

G

D )

O

generates

0 ,

001,

0 0 0 1

(6)

(II) S ! "|1|0S|S1 (III) S ! "|0|S1|SS A I and II B II and III C I and III D I E all three

18. IfL is undecidable, which of the following cannot be true? A There is a recognizer forL

B L ✓ Lhalt

C L is decidable D L is countable

E Any of the above could be true

19. Which CFG generates the same language as

1: S! 00S1 2: T ! 0S1 3: S! 0T 4: S! "|01 A S! "|01|00S11 B S! "|01|0S1|00S1 C S! "|01|00S1 D S! "|01|0000S11 E S! "|01|000S1

20. Under which of the following operations is the class of decidable problems closed: (I) complementation (II) union (III) intersection (IV) Kleene-Star ?

Hint: how would you construct deciders for languages defined using these operations? A all except IV B II and III C all except I D all E none 5

O

0

i f

£

where

decidable,

w e c a n

get

a

decider

f o r

L

by

inverting

t h e

output

o f

t h e

decider

for

L t .

T h i s

contradicts

t h e

o n

decidability

o f

L ,

s o

I

m u s t

also

b e

undecidable.

}

equivalent

t o

s

0 0 5 1

0

( I )

get

a

deciderfbor

LT

b y

inverting

the

output

o f

t h e

deciderf o r

L

( I I )

ACCEPT

i f

either

L ,

o r

L ,

deciders

accept,

REJECT

otherwise

(III)

ACCEPT

i f both

L ,

and

L z

decide

accept,

REJECT

otherwise

( I V )

write

a n

algorithm

t h a t

generates

a l l

partitions

o f

w

i n t o

substrings

and

r ' s

t h edecider

f o r

L

o n

each

part

of

thepartition.

ACCEPT

i f there's

a

partition

whose

sports

a r e

all

i n

L .

E l s e

REJECT

Figure

Updating...

References

Updating...

Related subjects :