https://github.com/alejandro945/cyk-algorithm-client
Next.js Conf is an investment in your project, your company, and even your career. Be ready to learn how developers are iterating faster and more efficiently than ever before.
https://github.com/alejandro945/cyk-algorithm-client
nuxt vercel-deployment vue
Last synced: 3 months ago
JSON representation
Next.js Conf is an investment in your project, your company, and even your career. Be ready to learn how developers are iterating faster and more efficiently than ever before.
- Host: GitHub
- URL: https://github.com/alejandro945/cyk-algorithm-client
- Owner: alejandro945
- Created: 2022-10-12T22:47:57.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-11T20:05:34.000Z (over 3 years ago)
- Last Synced: 2025-06-22T06:03:58.627Z (about 1 year ago)
- Topics: nuxt, vercel-deployment, vue
- Language: Vue
- Homepage: https://nuxt-examples-7qv7p7qhg-alejandro945.vercel.app
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
:books: CYK Algorithm for CFG in CNF :books:
## Algorithm :pencil:
The CYK algorithm is a decision algorithm for CFG (context-free grammar) in CNF (Chomsky normal form). This determines whether or not give string of length n is generated by a CFG. The algorithm is applied by filling a table with n rows and n columns. The pseudocode is:
### -Input:
A grammar G in CNF and a string of n terminals w = a1,a2 ... an.
### -Initialize:
j=1. For each i, 1 ≤ i ≤ n,
Xij = Xi1: set of variables A such that **A -> ai** is a production of G.
### -Repeat:
j = j + 1. For each i, 1 ≤ i ≤ n-j+1
Xij = set of variables A such that **A -> BC** is a production of G, with B ∈ Xik and C ∈ Xi+k,j-k, considering all k such that 1 ≤ k < j - 1.
### -Until:
j=n.
### -Output:
w ∈ L(G) if and only if S ∈ X1n.
# Application Manual :notebook:
## First Screen
You have to follow this link: https://nuxt-examples-c5g9kwu80-alejandro945.vercel.app/
Then, you will see something like this

In the field 'word', you have to put the chain of characters you want to process. **Example: abaab**
In the field 'amount of producers', you have to put the total number of producers that you have in the problem. **In this case we need 2**
**Make sure you fill these fields correctly** :heavy_exclamation_mark:
Finally, press the button to generate the table in the second screen.
## Second Screen
In this screen you have a table with the producers and the productions

To fill the table, you have to type the productions one by one, I mean, when you write one, press enter in your keyboard and then write the next
Once you finish, press the button 
**You have to receive a response of the algorithm**
In case that the chain belongs to the grammar, the response is:

The table result show us the productions to use to generate the chain step by step. In the final column and the first row, we can see the final response
### In case that the chain doesn't belong to the grammar you will see this

# :heavy_exclamation_mark: IMPORTANT :heavy_exclamation_mark:
**The backend is hosted in Heroku, when no one uses the application Heroku drops the service, so once you press the SEND button is probably to receive a response or not**
**You will see this in the console:**

**Please wait a minute while the service is deploying**
**When time passes, you can send the requests without problem**
# Tools used to create this project:
* Vue.js
* TypeScript
* Ruby