Deck 12: Theory of Computation

ملء الشاشة (f)
exit full mode
سؤال
Which of the following algorithms represents an optimal solution (in terms of time complexity)for sorting a list?

A) Insertion sort
B) Bubble sort
C) Selection sort
D) Merge sort
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
What is the time complexity of the problem of sorting a list?

A) Θ\Theta (log? n)
B) Θ\Theta (n)
C) Θ\Theta (n log? n)
D) Θ\Theta (n²)
سؤال
Which of the following is the most precise classification of a problem X?

A) X is in NP.
B) X is in P.
C) X is in O(n²).
D) X is in Θ\Theta (n²).
سؤال
Which of the following systems does not process the same computational capabilities as the others?

A) Turing machines
B) Universal programming languages
C) Algebraic expressions
D) The Bare Bones language
سؤال
The precise time complexity of which of the following problems has not yet been established by researchers?

A) Sorting a list
B) Searching through a list for a particular entry
C) The traveling salesman problem
D) Listing all possible subcommittees within a given committee
سؤال
What is the time complexity of the problem of searching for a particular entry in a list?

A) Θ\Theta (log? n)
B) Θ\Theta (n)
C) Θ\Theta (n log? n)
D) Θ\Theta (n²)
سؤال
Which of the following sets of values constitutes a valid RSA public key encryption system?

A) p = 5, q = 11, n = 55, e = 17, d = 13
B) p = 5, q = 11, n = 83, e = 17, d = 13
C) p = 5, q = 11, n = 83, e = 10, d = 13
D) p = 5, q = 11, n = 55, e = 10, d = 13
سؤال
The class of problems known as NP is so named because it is composed of which of the following?

A) Non-polynomial problems
B) Non-programmable problems
C) Non-universal problems
D) Non-deterministic polynomial problems
سؤال
What action is performed by the Turing machine described below?

 Current  state  Current  cell content  Value  to write  Direction  to move  New  state  START  left  X  X 10 left  X  X 00 right Y Y 00 right  Y  Y  no move  HALT \begin{array}{ccccc}\begin{array}{c}\text { Current } \\\underline{\text { state }}\end{array} & \begin{array}{c}\text { Current } \\\underline{\text { cell content }}\end{array} & \begin{array}{c}\text { Value } \\\underline{\text { to write }}\end{array} & \begin{array}{c}\text { Direction } \\\underline{\text { to move }}\end{array} & \begin{array}{c}\text { New } \\\underline{\text { state }}\end{array} \\\text { START } & * & * & \text { left } & \text { X } \\\text { X } & 1 & 0 & \text { left } & \text { X } \\\text { X } & 0 & 0 & \text { right } & \mathrm{Y} \\\text { Y } & 0 & 0 & \text { right } & \text { Y } \\\text { Y } & * & * & \text { no move } & \text { HALT }\end{array}

A) It replaces any string of consecutive 1s to the left of an * with 0s.
B) It leaves the tape unchanged.
C) It places an * at the left end of any string of consecutive 1s appearing to the left of an *.
D) It complements the string of 0s and 1s appearing to the left of an *.
سؤال
Which of the following best describes what the following Bare Bones program does?
 copy X to Z clear X incr X while Z not 0 :  clear X decr Z\begin{array} { l } \text { copy } \mathrm { X } \text { to } \mathrm { Z } \\\text { clear } \mathrm { X } \\\text { incr } \mathrm { X } \\\text { while } \mathrm { Z } \text { not } 0 \text { : } \\\text { clear } \mathrm { X } \\\text { decr } \mathrm { Z }\end{array}

A) It changes the value of X to 1.
B) If the starting value of X is 0, it sets the value of X to 0. Otherwise, it sets the value of X to 1.
C) If the starting value of X is 0, it sets the value of X to 1. Otherwise, it sets the value of X to 0.
D) It ultimately leaves X the same as it was when the program starteD.
سؤال
What action is performed by the Turing machine described below?


 Current  state  Current  cell content  Value  to write  Direction  to move  New  state  START  left  X  X 11 left X X0 right Y\begin{array} { c c c c c } \begin{array} { c } \text { Current } \\\underline{\text { state }}\end{array} & \begin{array} { c } \text { Current } \\\underline{\text { cell content }}\end{array} & \begin{array} { c } \text { Value } \\\underline{\text { to write }}\end{array} & \begin{array} { c } \text { Direction } \\\underline{\text { to move }}\end{array} & \begin{array} { c } \text { New } \\\underline{\text { state }}\end{array} \\\text { START } & * & * & \text { left } & \text { X } \\\text { X } & 1 & 1 & \text { left } & \mathrm { X } \\\text { X} & 0 & * &\text { right }& \mathrm { Y }\end{array}

A) It replaces any string of consecutive 1s to the left of an * with 0s.
B) It leaves the tape unchanged.
C) It places an * at the left end of any string of consecutive 1s appearing to the left of an *.
D) It complements the string of 0s and 1s appearing to the left of an *.
سؤال
If a solution with time complexity Θ\Theta (n²)is known to exist,then the problem is known to be in which of the following?

A) Θ\Theta (n²)
B) O(n²)
C) Θ\Theta (n³)
D) Θ\Theta (n)
سؤال
If an RSA public key encryption system were based on the primes p = 3 and q = 7,which of the following pairs of values would be suitable for the encryption and decryption keys e and d?

A) 2 and 6
B) 5 and 29
C) 4 and 9
D) 7 and 23
سؤال
Which of the following statements is true?

A) The Bare Bones programming language would still be a universal language if the clear statement was removed.
B) The Bare Bones programming language would still be a universal language if the incr statement was removed.
C) The Bare Bones programming language would still be a universal language if the decr statement was removed.
D) The Bare Bones programming language would still be a universal language if the while statement was removeD.
سؤال
Which of the following questions has not yet been answered by researchers?

A) Is P contained in NP?
B) Is NP contained in P?
C) Are all the problems in NP solvable?
D) Are all the problems in P solvable?
سؤال
Turing machines represent

A) an effort to define the limits of algorithmic systems.
B) a class of machines that can compute very little.
C) a class of machines that are now out of date and no longer important.
D) a class of machines that can compute all functions.
سؤال
Which of the following statements is false?

A) If a problem can be solved by a Bare Bones program, then it can be solved by a Turing machine.
B) If a problem can be solved by a Turing machine, then it can be solved by a Bare Bones program.
C) The halting problem cannot be solved by a Bare Bones program.
D) The halting problem can be solved only by using a universal programming language.
سؤال
An unsolvable problem is a problem for which

A) no solution exists.
B) no one knows the solution.
C) no algorithm exists for finding the solution.
D) no one wants to known the solution.
سؤال
Which of the following Bare Bones programs is self-terminating?

A) while X not 0:
B) while X not 0:
C) decr X decr X while X not 0:
سؤال
Suppose the variables X and Y in the following Bare Bones program have the values 3 and 2,respectively,when execution begins.
 clear Z while X not 0: while Y not 0: decr Y incr Z incr Z decr X\begin{array} { l } \text { clear } \mathrm { Z } \\\text { while X not } 0 : \\\text { while } Y \text { not } 0 : \\\text { decr } Y \\\text { incr } Z \\\text { incr } \mathrm { Z } \\\text { decr } X\end{array}
What will be the value of Z when the program terminates?

A) 0
B) 1
C) 5
D) 6
سؤال
Place an X in the blank before each of the following statements that guarantees that a problem is in P.
_____ The problem is in O(n²).
_____ The problem is in O(2?).
_____ The problem is in O(log? n).
_____ The problem is in O(n³).
سؤال
If we were using RSA encryption with the private keys n = 133 and d = 5,what would be the decrypted version of the encrypted message whose bit pattern is 11?
__________
سؤال
If the prime numbers underlying an RSA encryption system are small,the system is not secure.For example,suppose you were told that the public keys of a system were n = 15 and e = 13.
A.What are the two prime numbers on which the system is based?
_______ ________
B.What is the value of the decryption key d?
سؤال
A.Give an example of an algorithm for sorting a list with time complexity in Θ\Theta (n2).

B.Give an example of an algorithm for sorting a list with time complexity in Θ\Theta (n lg n).
سؤال
Give an example of a problem in NP that may not be in P.
سؤال
Identify a problem that does not have an algorithmic solution.
سؤال
A _______________ is a relationship between input and output values such that any input is associated
with only one output.If the output can be determined algorithmically from the input,the relationship is
said to be _______________ .
سؤال
List the letters associated with the following problems in the order of increasing complexity of the problems.
15.List the letters associated with the following problems in the order of increasing complexity of the problems.
A.Sorting a list
B.The halting problem
C.Searching through a list for a particular entry
سؤال
If we were using RSA encryption with the public keys n = 91 and e = 5,what would be the encrypted version of the message whose bit pattern is 11?
__________
سؤال
Place a T in the blank before each of the following statements that are true.Leave the other blanks blank.
_____ P is contained in NP.
_____ All solvable problems are in P.
_____ The traveling salesman problem is in NP.
_____ The traveling salesman problem is not solvable.
سؤال
Place an X in the blank before each of the following statements that contradict the Church-Turing thesis.Leave the other blanks blank.
_____ All functions are computable.
_____ Some functions that are not computable by Turing machines are computable by other
means.
_____ All computable functions are Turing-computable.
_____ Some problems cannot be solved by any Turing machine.
سؤال
Suppose the variable X in the following Bare Bones program has the value 3 when execution begins.
 clear Y decr X while X not 0: decr X incr Y\begin{array} { l } \text { clear } Y \\\text { decr } X \\\text { while X not } 0 : \\\text { decr } X \\\text { incr } Y\end{array}
A.What will be the value of X when the program terminates?

B.What will be the value of Y when the program terminates?
سؤال
List the following complexity classes in order of increasing complexity.
Θ(n3)Θ(2n)Θ(log2n)Θ(n)\Theta \left( n ^ { 3 } \right) \quad \Theta \left( 2 ^ { n } \right) \quad \Theta \left( \log _ { 2 } n \right) \quad \Theta ( n )
سؤال
Suppose the variables X and Y in the following Bare Bones program have the values 3 and 2,respectively,when execution begins.What will be the value of Z when the program terminates?
_________
clear Z
while X not 0:
clear W
while Y not 0:
decr Y
incr W
while W not 0:
incr Z
incr Y
decr W
decr X
incr Z
سؤال
Give an example of a universal programming language.
سؤال
Place a T in the blank before each of the following statements that are true.Leave the other blanks blank.
_____ All Bare Bones programs that do not contain a while statement are self-terminating.
_____ All Bare Bones programs that contain a while statement are not self-terminating.
_____ Some Bare Bones programs are both self-terminating and not self-terminating.
_____ No Bare Bones program is both self-terminating and not self-terminating.
سؤال
Complete the following sentence.
An NP-complete problem is a problem in NP for which ___________________________.
سؤال
Suppose a problem in Θ\Theta (n³)has been solved in 1 second.How long should you expect the same machine to require to solve a new instance of the problem with input that is twice the size as before?
سؤال
Suppose the variables X and Y in the following Bare Bones program have the values 3 and 2,respectively,when execution begins.What will be the value of Z when the program terminates?
_________
clear Z
while X not 0:
decr X
incr Z
while Y not 0:
decr Y
incr Z
سؤال
Place an F in the blank before each of the following statements that are false.Leave the other blanks blank.
_____ No one has discovered a problem that cannot be solved by a Turing machine.
_____ The Bare Bones programming language would not be a universal language if the clear
statement were removed.
_____ The only problem that cannot be solved by a Turing machine is the halting problem.
_____ Some problems cannot be solved by any Turing machine.
سؤال
Write a program in Bare Bones that terminates with the variable Z equal to 1 if the variables X and Y start with non-zero values and with Z equal to 0 otherwise.
سؤال
What was Alan Turing's purpose when developing the concept of the Turing machine?
سؤال
What is a universal programming language?
سؤال
Why is a public key encryption system based on the RSA algorithm secure?
سؤال
Is a problem in O(n³)more complex than a problem in O(n²)? Explain your answer.
سؤال
State the Church-Turing thesis.
سؤال
Explain the distinction between time complexity and space complexity.
سؤال
Write a program in Bare Bones that will add one to the variable X if X is not 0 and leave X unchanged otherwise.
سؤال
Is the following Bare Bones program self-terminating? Explain your answer.
copy X to Z
decr Z
while Z not 0:
decr Z
decr X
while X not 0:
سؤال
Are all problems in P solvable in a reasonable amount of time? Explain your answer.
سؤال
Write a sequence of statements in the Bare Bones language that is equivalent to the statement
if X not 0:
S1
else:
S2
where S1 and S2 are sequences of Bare Bones statements.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/51
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 12: Theory of Computation
1
Which of the following algorithms represents an optimal solution (in terms of time complexity)for sorting a list?

A) Insertion sort
B) Bubble sort
C) Selection sort
D) Merge sort
D
2
What is the time complexity of the problem of sorting a list?

A) Θ\Theta (log? n)
B) Θ\Theta (n)
C) Θ\Theta (n log? n)
D) Θ\Theta (n²)
Θ\Theta (n log? n)
3
Which of the following is the most precise classification of a problem X?

A) X is in NP.
B) X is in P.
C) X is in O(n²).
D) X is in Θ\Theta (n²).
X is in Θ\Theta (n²).
4
Which of the following systems does not process the same computational capabilities as the others?

A) Turing machines
B) Universal programming languages
C) Algebraic expressions
D) The Bare Bones language
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
5
The precise time complexity of which of the following problems has not yet been established by researchers?

A) Sorting a list
B) Searching through a list for a particular entry
C) The traveling salesman problem
D) Listing all possible subcommittees within a given committee
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
6
What is the time complexity of the problem of searching for a particular entry in a list?

A) Θ\Theta (log? n)
B) Θ\Theta (n)
C) Θ\Theta (n log? n)
D) Θ\Theta (n²)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
7
Which of the following sets of values constitutes a valid RSA public key encryption system?

A) p = 5, q = 11, n = 55, e = 17, d = 13
B) p = 5, q = 11, n = 83, e = 17, d = 13
C) p = 5, q = 11, n = 83, e = 10, d = 13
D) p = 5, q = 11, n = 55, e = 10, d = 13
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
8
The class of problems known as NP is so named because it is composed of which of the following?

A) Non-polynomial problems
B) Non-programmable problems
C) Non-universal problems
D) Non-deterministic polynomial problems
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
9
What action is performed by the Turing machine described below?

 Current  state  Current  cell content  Value  to write  Direction  to move  New  state  START  left  X  X 10 left  X  X 00 right Y Y 00 right  Y  Y  no move  HALT \begin{array}{ccccc}\begin{array}{c}\text { Current } \\\underline{\text { state }}\end{array} & \begin{array}{c}\text { Current } \\\underline{\text { cell content }}\end{array} & \begin{array}{c}\text { Value } \\\underline{\text { to write }}\end{array} & \begin{array}{c}\text { Direction } \\\underline{\text { to move }}\end{array} & \begin{array}{c}\text { New } \\\underline{\text { state }}\end{array} \\\text { START } & * & * & \text { left } & \text { X } \\\text { X } & 1 & 0 & \text { left } & \text { X } \\\text { X } & 0 & 0 & \text { right } & \mathrm{Y} \\\text { Y } & 0 & 0 & \text { right } & \text { Y } \\\text { Y } & * & * & \text { no move } & \text { HALT }\end{array}

A) It replaces any string of consecutive 1s to the left of an * with 0s.
B) It leaves the tape unchanged.
C) It places an * at the left end of any string of consecutive 1s appearing to the left of an *.
D) It complements the string of 0s and 1s appearing to the left of an *.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
10
Which of the following best describes what the following Bare Bones program does?
 copy X to Z clear X incr X while Z not 0 :  clear X decr Z\begin{array} { l } \text { copy } \mathrm { X } \text { to } \mathrm { Z } \\\text { clear } \mathrm { X } \\\text { incr } \mathrm { X } \\\text { while } \mathrm { Z } \text { not } 0 \text { : } \\\text { clear } \mathrm { X } \\\text { decr } \mathrm { Z }\end{array}

A) It changes the value of X to 1.
B) If the starting value of X is 0, it sets the value of X to 0. Otherwise, it sets the value of X to 1.
C) If the starting value of X is 0, it sets the value of X to 1. Otherwise, it sets the value of X to 0.
D) It ultimately leaves X the same as it was when the program starteD.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
11
What action is performed by the Turing machine described below?


 Current  state  Current  cell content  Value  to write  Direction  to move  New  state  START  left  X  X 11 left X X0 right Y\begin{array} { c c c c c } \begin{array} { c } \text { Current } \\\underline{\text { state }}\end{array} & \begin{array} { c } \text { Current } \\\underline{\text { cell content }}\end{array} & \begin{array} { c } \text { Value } \\\underline{\text { to write }}\end{array} & \begin{array} { c } \text { Direction } \\\underline{\text { to move }}\end{array} & \begin{array} { c } \text { New } \\\underline{\text { state }}\end{array} \\\text { START } & * & * & \text { left } & \text { X } \\\text { X } & 1 & 1 & \text { left } & \mathrm { X } \\\text { X} & 0 & * &\text { right }& \mathrm { Y }\end{array}

A) It replaces any string of consecutive 1s to the left of an * with 0s.
B) It leaves the tape unchanged.
C) It places an * at the left end of any string of consecutive 1s appearing to the left of an *.
D) It complements the string of 0s and 1s appearing to the left of an *.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
12
If a solution with time complexity Θ\Theta (n²)is known to exist,then the problem is known to be in which of the following?

A) Θ\Theta (n²)
B) O(n²)
C) Θ\Theta (n³)
D) Θ\Theta (n)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
13
If an RSA public key encryption system were based on the primes p = 3 and q = 7,which of the following pairs of values would be suitable for the encryption and decryption keys e and d?

A) 2 and 6
B) 5 and 29
C) 4 and 9
D) 7 and 23
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
14
Which of the following statements is true?

A) The Bare Bones programming language would still be a universal language if the clear statement was removed.
B) The Bare Bones programming language would still be a universal language if the incr statement was removed.
C) The Bare Bones programming language would still be a universal language if the decr statement was removed.
D) The Bare Bones programming language would still be a universal language if the while statement was removeD.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
15
Which of the following questions has not yet been answered by researchers?

A) Is P contained in NP?
B) Is NP contained in P?
C) Are all the problems in NP solvable?
D) Are all the problems in P solvable?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
16
Turing machines represent

A) an effort to define the limits of algorithmic systems.
B) a class of machines that can compute very little.
C) a class of machines that are now out of date and no longer important.
D) a class of machines that can compute all functions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
17
Which of the following statements is false?

A) If a problem can be solved by a Bare Bones program, then it can be solved by a Turing machine.
B) If a problem can be solved by a Turing machine, then it can be solved by a Bare Bones program.
C) The halting problem cannot be solved by a Bare Bones program.
D) The halting problem can be solved only by using a universal programming language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
18
An unsolvable problem is a problem for which

A) no solution exists.
B) no one knows the solution.
C) no algorithm exists for finding the solution.
D) no one wants to known the solution.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
19
Which of the following Bare Bones programs is self-terminating?

A) while X not 0:
B) while X not 0:
C) decr X decr X while X not 0:
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
20
Suppose the variables X and Y in the following Bare Bones program have the values 3 and 2,respectively,when execution begins.
 clear Z while X not 0: while Y not 0: decr Y incr Z incr Z decr X\begin{array} { l } \text { clear } \mathrm { Z } \\\text { while X not } 0 : \\\text { while } Y \text { not } 0 : \\\text { decr } Y \\\text { incr } Z \\\text { incr } \mathrm { Z } \\\text { decr } X\end{array}
What will be the value of Z when the program terminates?

A) 0
B) 1
C) 5
D) 6
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
21
Place an X in the blank before each of the following statements that guarantees that a problem is in P.
_____ The problem is in O(n²).
_____ The problem is in O(2?).
_____ The problem is in O(log? n).
_____ The problem is in O(n³).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
22
If we were using RSA encryption with the private keys n = 133 and d = 5,what would be the decrypted version of the encrypted message whose bit pattern is 11?
__________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
23
If the prime numbers underlying an RSA encryption system are small,the system is not secure.For example,suppose you were told that the public keys of a system were n = 15 and e = 13.
A.What are the two prime numbers on which the system is based?
_______ ________
B.What is the value of the decryption key d?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
24
A.Give an example of an algorithm for sorting a list with time complexity in Θ\Theta (n2).

B.Give an example of an algorithm for sorting a list with time complexity in Θ\Theta (n lg n).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
25
Give an example of a problem in NP that may not be in P.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
26
Identify a problem that does not have an algorithmic solution.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
27
A _______________ is a relationship between input and output values such that any input is associated
with only one output.If the output can be determined algorithmically from the input,the relationship is
said to be _______________ .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
28
List the letters associated with the following problems in the order of increasing complexity of the problems.
15.List the letters associated with the following problems in the order of increasing complexity of the problems.
A.Sorting a list
B.The halting problem
C.Searching through a list for a particular entry
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
29
If we were using RSA encryption with the public keys n = 91 and e = 5,what would be the encrypted version of the message whose bit pattern is 11?
__________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
30
Place a T in the blank before each of the following statements that are true.Leave the other blanks blank.
_____ P is contained in NP.
_____ All solvable problems are in P.
_____ The traveling salesman problem is in NP.
_____ The traveling salesman problem is not solvable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
31
Place an X in the blank before each of the following statements that contradict the Church-Turing thesis.Leave the other blanks blank.
_____ All functions are computable.
_____ Some functions that are not computable by Turing machines are computable by other
means.
_____ All computable functions are Turing-computable.
_____ Some problems cannot be solved by any Turing machine.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
32
Suppose the variable X in the following Bare Bones program has the value 3 when execution begins.
 clear Y decr X while X not 0: decr X incr Y\begin{array} { l } \text { clear } Y \\\text { decr } X \\\text { while X not } 0 : \\\text { decr } X \\\text { incr } Y\end{array}
A.What will be the value of X when the program terminates?

B.What will be the value of Y when the program terminates?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
33
List the following complexity classes in order of increasing complexity.
Θ(n3)Θ(2n)Θ(log2n)Θ(n)\Theta \left( n ^ { 3 } \right) \quad \Theta \left( 2 ^ { n } \right) \quad \Theta \left( \log _ { 2 } n \right) \quad \Theta ( n )
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
34
Suppose the variables X and Y in the following Bare Bones program have the values 3 and 2,respectively,when execution begins.What will be the value of Z when the program terminates?
_________
clear Z
while X not 0:
clear W
while Y not 0:
decr Y
incr W
while W not 0:
incr Z
incr Y
decr W
decr X
incr Z
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
35
Give an example of a universal programming language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
36
Place a T in the blank before each of the following statements that are true.Leave the other blanks blank.
_____ All Bare Bones programs that do not contain a while statement are self-terminating.
_____ All Bare Bones programs that contain a while statement are not self-terminating.
_____ Some Bare Bones programs are both self-terminating and not self-terminating.
_____ No Bare Bones program is both self-terminating and not self-terminating.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
37
Complete the following sentence.
An NP-complete problem is a problem in NP for which ___________________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
38
Suppose a problem in Θ\Theta (n³)has been solved in 1 second.How long should you expect the same machine to require to solve a new instance of the problem with input that is twice the size as before?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
39
Suppose the variables X and Y in the following Bare Bones program have the values 3 and 2,respectively,when execution begins.What will be the value of Z when the program terminates?
_________
clear Z
while X not 0:
decr X
incr Z
while Y not 0:
decr Y
incr Z
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
40
Place an F in the blank before each of the following statements that are false.Leave the other blanks blank.
_____ No one has discovered a problem that cannot be solved by a Turing machine.
_____ The Bare Bones programming language would not be a universal language if the clear
statement were removed.
_____ The only problem that cannot be solved by a Turing machine is the halting problem.
_____ Some problems cannot be solved by any Turing machine.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
41
Write a program in Bare Bones that terminates with the variable Z equal to 1 if the variables X and Y start with non-zero values and with Z equal to 0 otherwise.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
42
What was Alan Turing's purpose when developing the concept of the Turing machine?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
43
What is a universal programming language?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
44
Why is a public key encryption system based on the RSA algorithm secure?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
45
Is a problem in O(n³)more complex than a problem in O(n²)? Explain your answer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
46
State the Church-Turing thesis.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
47
Explain the distinction between time complexity and space complexity.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
48
Write a program in Bare Bones that will add one to the variable X if X is not 0 and leave X unchanged otherwise.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
49
Is the following Bare Bones program self-terminating? Explain your answer.
copy X to Z
decr Z
while Z not 0:
decr Z
decr X
while X not 0:
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
50
Are all problems in P solvable in a reasonable amount of time? Explain your answer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
51
Write a sequence of statements in the Bare Bones language that is equivalent to the statement
if X not 0:
S1
else:
S2
where S1 and S2 are sequences of Bare Bones statements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 51 في هذه المجموعة.