LBRY Block Explorer

LBRY Claims • chomsky-normal-form-(cnf)-conversion

22aa6c2e61ca44f81b33aa4066aaa4042b54a60b

Published By
Created On
8 Oct 2021 17:01:06 UTC
Transaction ID
Cost
Safe for Work
Free
Yes
Chomsky Normal Form (CNF) Conversion - Easy Theory
Here we convert a context-free grammar into Chomsky Normal Form, and show that it works for any CFG. The process involves 5 stages: (1) ensure the start variable is not on the RHS of any rule, (2) "eliminate" epsilon-rules, (3) "eliminate" unit rules, (4) ensure the RHS is only variables or a single terminal, and (5) reduce "long" RHSes. The order of the rules is important!

Timestamps:
0:00 - Intro
1:30 - Step 1 (ensure start var not on RHS)
3:25 - Step 2 ("eliminate" epsilon rules)
9:10 - Step 3 ("eliminate" unit rules)
13:48 - Step 4 (remove mix of terminals and vars)
17:18 - Step 5 (ensure RHSes are of length at most 2)

Patreon: https://www.patreon.com/easytheory

If you like this content, please consider subscribing to my channel: https://www.youtube.com/channel/UC3VY6RTXegnoSD_q446oBdg?sub_confirmation=1

▶ADDITIONAL QUESTIONS◀
1. Can you prove why it is the case that each stage never changes the language of the CFG?
2. What if we have a regular grammar and convert it to CNF? (i.e., every rule is either A to epsilon, A to a single terminal, A to a variable B, or A to xB where x is a terminal, B a variable)

▶SEND ME THEORY QUESTIONS◀
ryan.e.dougherty@icloud.com

▶ABOUT ME◀
I am a professor of Computer Science, and am passionate about CS theory. I have taught over 12 courses at Arizona State University, as well as Colgate University, including several sections of undergraduate theory.
...
https://www.youtube.com/watch?v=-SZkkMWHBvQ
Author
Content Type
Unspecified
video/mp4
Language
English
Open in LBRY

More from the publisher

Controlling
VIDEO
HORSE
Controlling
VIDEO
PUMPI
Controlling
VIDEO
MAPPI
Controlling
VIDEO
OFFIC
Controlling
VIDEO
REGUL
Controlling
VIDEO
LET'S
Controlling
VIDEO
CALOR
Controlling
VIDEO
THE S
Controlling
VIDEO
SAVIT