logo

String Regular Expression Assignment

   

Added on  2022-08-22

5 Pages699 Words42 Views
Question 1 (1 point)
Which of the following are not strings in the language defined by the regular
expression
a b+ c{2} d?
(Choose all that apply)
Question 2 options:
abcd
abbccdd
abbbcc
bccd
Question 2 (1 point)
Use truth tables to determine whether the following proposition is a tautology or a
contradiction:
p => (q => p)
Truth table
p q Q=>p P=>(q=>p
)
tautology contradictio
n
T T T T T F
T F T T T F
F T F F T F
F F F F T F
P=> (q=>p) is neither a tautology nor contradiction.
Question 6 options:
Tautology
Contradiction
Question 3 (1 point)
Calculate the truth value of the following proposition:
(1 < 0) (2 < 1)

Let (1<0) be A which is a false statement and
(2<1) be B is also a false statement
Therefore:
(A) (B) => (F) and (F)
Which always give a false (F).
Question 7 options:
True
False
Question 4 (1 point)
Calculate the truth value of the following proposition:
(0 < 1) (1 < 2)
Let (0<1) be A and (1 < 2) be B
A is a true statement while B is a true statement also.
Therefore:
A B results in a true value.
Question 10 options:
True
False
Question 5 (1 point)
Which of the following are valid strings as defined by this regular expression
[bc]+at
(Choose all that apply)
Question 11 options:
cat
catbat

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Summarized Text on Various Propositions and Statements
|7
|2109
|215

Discrete Mathematics Assignment Solutions
|20
|2548
|339

Theory of Computation
|11
|2362
|53

Computer Theory Basics Answer 2022
|10
|2216
|16

Algorithms and Data Structures- Assignment
|4
|1005
|182

Logical Operators and Truth Tables
|7
|1048
|77