Find Jobs
Hire Freelancers

Regular Languages compiler

$10-30 USD

Dokončeno
Zveřejněno přibližně před 2 roky

$10-30 USD

Zaplaceno při doručení
For this task you need to implement Thompson’s construction for converting a regular expres- sion to an equivalent NFA. Description of Thompson’s construction can be found in Chapter 3 of the textbook and at [login to view URL]’s_construction. 2 Requirements • We make the following assumptions for simplicity. a) The alphabet Σ of the regular expression is always the binary alphabet {0, 1}. b) Regular expressions do not include ∅. c) The empty string ε is represented by e. d) ◦ is represented by . and ∪ by |. e) Regular expressions are represented in postfix notation. f) States of the resulting NFA are numbers. g) For a postfix regular expression R, states introduced by NFA equivalent to a prefix of R are smaller (as numbers) than states introduced by NFA equivalent to longer prefixes of R. For operators (such as concatenation and *) which introduce a start and an accept state, the start state is smaller (as a number) than the accept state. • You should implement a class constructor RegToNFA and a method toString. • RegToNFA takes one parameter which is a string description of a postfix regular expression and constructs the equivalent NFA as per Thompson’s construction. • toString returns a string describing the NFA resulting from Thompson’s construction. A string describing the NFA resulting from Thompson’s construction is of the form N#I#F#Z#O#E. – N is the number of states of the NFA. – I is the initial state. – F is the final state. – Z, O, and E, respectively, represent the 0-transitions, the 1-transitions, and the ε-transitions. 1 – Z, O, and E are semicolon-separated sequences of pairs of states; each pair is a comma-separated sequence of two states. A pair i, j represents a transition from state i to state j; for Z this means that δ(i,0) = j, similarly for O and E. These pairs are sorted by the source state and (if multiple pairs share the same source state, due to non-determinism) then by the destination state. – For example, toString, being invoked on a a RegToNFA object representing the regular expression 01|, should return the string 6#4#5#0,1#2,3#1,5;3,5;4,0;4,2
IČ projektu: 33248763

O projektu

3 nabídky
Vzdálený projekt
Aktivní před 2 roky

Chcete si vydělat nějaké peníze?

Výhody podávání nabídek na Freelancer

Stanovte si rozpočet a časový rámec
Získejte za svou práci zaplaceno
Načrtněte svůj návrh
Registrace a podávání nabídek je zdarma
Uděleno:
Avatar uživatele
Hi! I am really intersted in the task. I have a solid algorithmic background and can complete the task of implementing Thompson’s construction in the shortest amount of time. Looking forward working with you! Best regards, Adai
$20 USD v 7 dnech
0,0 (0 recenze)
0,6
0,6
3 freelanceři nabízejí v průměru $20 USD za tuto práci
Avatar uživatele
Hello Sir/ Ma’am A skilled full stack developer, I have rich experience in JAVA,C, C++, C#, Python, .NET , MYSQL, SQL, IONIC , MATLAB,PHP and ARDUINO. I am very confident with my skills and I'd like to help your business by doing my best. I am able to work full time on your time zone and start working right away. Please confirm that I am one of the best fits for you and drop me a message for further discussion. High-quality & Fast-delivery is promised! Thanks and Best Regards
$20 USD v 7 dnech
4,3 (31 recenze)
5,7
5,7

O klientovi

Pochází z EGYPT
Cairo, Egypt
5,0
2
Ověřená platební metoda
Členem od led 5, 2022

Ověření klienta

Díky! Poslali jsme vám e-mailem odkaz pro získání kreditu zdarma.
Při odesílání e-mailu se něco pokazilo. Zkuste to prosím znovu.
Registrovaných uživatelů Zveřejněných projektů
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Načítání náhledu
Bylo uděleno povolení ke geolokaci.
Vaše doba přihlášení vypršela a byli jste odhlášeni. Přihlaste se znovu.