Given these Backus Naur Form rules: <digit> ::= 1|2|3|4|5|6|7|8|9| <number> ::= <digit> I <digit><number> <letter> ::= a|b|c|...|z <special> ::= -|- <char> ::= <digit>|<number>|<special> <identifier> ::= <letter> | <char> | <letter><identifier> <comparison> ::= <I>I<=|>===I= <relational> ::= <identifier> <comparison> <identifier> <if-statement> ::= IF <conditional> THEN <expression> [ELSE <expression>] Which of these options would give us a definition for <conditional> that allows for robust conditional statements such as (but not limited to) the following statements to be valid? a<b a<bAND b<c bOR cOR d O<logic_op>=AND|OR|NOT Option 1: <conditional> ::= <relational>|<relational> <logic_op> <conditional> O<logic_op> := AND | OR | NOT Option 2: <conditional> ::= <relational>|<conditional> <logic_op> <conditional>|<identifier> O<logic_op> := AND|OR|NOT Option 3: <conditional> ::= <relational>|<relational> <logic_op> <relational>| <identifier> O<conditional> := <relational>|<identifier> OR <identifier>|<relational> <AND> <relational>
Added by John O.
Close
Step 1
First, let's analyze the given options: Option 1: <conditional> ::= <relational>|<relational> <logic_op> <conditional> O<logic_op> := AND | OR | NOT Option 2: <conditional> ::= <relational>|<conditional> <logic_op> <conditional>|<identifier> O<logic_op> := Show more…
Show all steps
Your feedback will help us improve your experience
Shreya Jain and 67 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
1. Construct a truth table for "P does not imply Q". 2. Let P, Q be logical statements. Reformulate the statement "P does not imply Q" using only conjunction and negation. 3. Let P(x), Q(x) be logical statements with a real parameter x. Reformulate the statement "For every x ∈ ℝ, P(x) does not imply Q(x)" using only quantifiers, conjunction, and negation. 4. There are two different ways to put parentheses in the expression P ⇒ Q ⇒ R. Are they equivalent? If yes, construct truth tables. If not, explain why not. 5. P ⇒ Q ⇒ R can also be read as "(P ⇒ Q) and (Q ⇒ R)". Is this equivalent to any of the other two interpretations? 6. Let P(x), Q(x) be logical statements with a parameter x ∈ S. Is "∀x ∈ S, P(x) and Q(x)" the same as "(∀x ∈ S, P(x)) and (∀x ∈ S, Q(x))"? What about "∀x ∈ S, P(x) or Q(x)" versus "(∀x ∈ S, P(x)) or (∀x ∈ S, Q(x))"? Here S is an arbitrary scope. You may consider the case S = {0, 1} if you find this case easier. 7. Let an be a sequence of real numbers, and let a be a real number. The following is the definition of convergence of an to a. For any real number ε > 0, there exists a natural number N such that for any natural number n > N we have |an - a| < ε. Write the negation of this, i.e. the definition of non-convergence of an to a. Your definition should only use positive statements, which means that you cannot use "not". 8. What does the statement ∀x, y ∈ ℝ, x < y ⇒ (∃z ∈ ℝ s.t. x < z < y) mean?
Keondre P.
Suppose that f(x) is a function that is defined everywhere, except possibly at x = c. Recall that lim f(x) = L means: For all ε > 0 there is some δ > 0 such that for all x satisfying 0 < |x - c| < δ we have that |f(x) - L| < ε. What if the limit does not equal L? Think about what the means in ε, δ language. Consider the following symbols and phrases: A. for all ε > 0 B. there is some ε > 0 such that C. for all δ > 0 D. there is some δ > 0 such that E. for all x satisfying F. there is some x satisfying G. 0 < |x - c| < δ H. |x - c| ≥ δ I. |f(x) - L| < ε J. |f(x) - L| ≥ ε K. and Combine these symbols and phrases to form a rigorous assertion that lim f(x) ≠ L.
Vincenzo Z.
2.2.2* What happens if we reverse the order of the quantifiers in the definition of sequence convergence? Say that a sequence (xn) verconges to x if there exists ε > 0 such that for all N ∈ ℕ it is true that n ≥ N implies |xn - x| < ε. (a) Give an example of a sequence which verconges but does not converge. (b) Show (an example is sufficient) that the "limit" (or should it be milit?) x need not be unique [in fact, if one exists it is never unique]. (c) What familiar property of sequences is equivalent to being vercongent? You don't have to write a full proof, but explain briefly.
William M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Watch the video solution with this free unlock.
EMAIL
PASSWORD