Understanding Grammar #2: Ambiguity, Elimination, and Boolean Expressions

AI Thread Summary
The discussion revolves around two grammars: the first generates strings like (a,a) and (a,(a,a)), while the second defines boolean expressions with constructs like "or," "and," and "not." Participants question the ambiguity of the second grammar and seek methods to eliminate it, as well as ways to prove it generates all boolean expressions. Clarifications are requested regarding notation, such as the use of symbols for logical operations and the meaning of parentheses in programming. The conversation emphasizes understanding the definitions of ambiguity and terminals in the context of grammar rules.
magneeto
Messages
6
Reaction score
0
what langugage??

grammar #1:

S->(L)|a
L->L,S|S

what language does this grammar generate? some strings generated by this grammar r (a,a), (a,(a,a))...

grammmar #2:

bexpr->bexpr or bterm| bterm
bterm-> bterm and bfactor| bfactor
bfactor-> not bfactor| (bexpr) | true | false

is this grammar ambiguous? if so then why?
is there any way to eliminate ambiguity?
how do i show that this grammmar generates all boolean expressions? i can see it but how do i proceed to prove it?
 
Computer science news on Phys.org
when you type L,S do you mean LS
and when you type or and and are you using the booleans | and &
(|| and &&,the hat and the v whichever notation you like )
what do teh brackets () normally represent in programming
ask your self what is an ambiguity and what are "terminals"
what do the rules bexpr and bterm attempt represent
how does one normally write boolean logic?? or concatenate sets of booleans
 
",","()","a" are all terminals and "|" is not the logical or . it is the or for regular expressions(either expr1 or expr2)
 
I came across a video regarding the use of AI/ML to work through complex datasets to determine complicated protein structures. It is a promising and beneficial use of AI/ML. AlphaFold - The Most Useful Thing AI Has Ever Done https://www.ebi.ac.uk/training/online/courses/alphafold/an-introductory-guide-to-its-strengths-and-limitations/what-is-alphafold/ https://en.wikipedia.org/wiki/AlphaFold https://deepmind.google/about/ Edit/update: The AlphaFold article in Nature John Jumper...
Thread 'Urgent: Physically repair - or bypass - power button on Asus laptop'
Asus Vivobook S14 flip. The power button is wrecked. Unable to turn it on AT ALL. We can get into how and why it got wrecked later, but suffice to say a kitchen knife was involved: These buttons do want to NOT come off, not like other lappies, where they can snap in and out. And they sure don't go back on. So, in the absence of a longer-term solution that might involve a replacement, is there any way I can activate the power button, like with a paperclip or wire or something? It looks...
Back
Top