Nomenclature is a system for giving names to things within a particular profession or field. The XYZ Exporters and Co. is a new firm in Pakistan having two units in Karachi & Lahore. They decided to generate employee numbers using a specific pattern by applying nomenclature. This pattern consists of unit identification, department identification, employee appointment month, year and he/she will be having a unique registration number. The top management of XYZ Exporters and Co. has approved the following pattern for the employee numbers. Unit Code - Department Code / Joining Month Code - Joining Year - Employee Unique Number This Firm currently has five departments, HR, IT, Exports, Accounts & Finance, & Production, and two units Karachi & Lahore and their codes are as under: Department Name Department Code Human Resource 01 Information Technology 02 Export 03 Accounts & Finance 04 Production 05 Unit Name Unit Code Karachi 1 Lahore 2 Month Month Code January M01 February M02 March M03 April M04 May M05 June M06 July M07 August M08 September M09 October M10 November M11 December M12 If a person joins the HR department in Karachi in the Year 2015 and the month is May; his complete registration number will look like this: 1-01/M05-2015-001 If two persons join the Export department in Lahore in the Year 2016 and the month is February; their complete registration numbers will look like this: 2-03/M02-2016-001 2-03/M02-2016-002 Now, you have to write a regular expression for all patterns accepted by the top management of XYZ Exporters and Co and generate five employee numbers. b) After generating the regular expression in part(a), convert it into Finite Automata.
Nomenclature is a system for giving names to things within a particular profession or field. The XYZ Exporters and Co. is a new firm in Pakistan having two units in Karachi & Lahore. They decided to generate employee numbers using a specific pattern by applying nomenclature.
This pattern consists of unit identification, department identification, employee appointment month, year and he/she will be having a unique registration number.
The top management of XYZ Exporters and Co. has approved the following pattern for the employee numbers.
Unit Code - Department Code / Joining Month Code - Joining Year - Employee Unique Number
This Firm currently has five departments, HR, IT, Exports, Accounts & Finance, & Production, and two units Karachi & Lahore and their codes are as under:
Department Name Department Code
Human Resource 01
Information Technology 02
Export 03
Accounts & Finance 04
Production 05
Unit Name Unit Code
Karachi 1
Lahore 2
Month Month Code
January M01
February M02
March M03
April M04
May M05
June M06
July M07
August M08
September M09
October M10
November M11
December M12
If a person joins the HR department in Karachi in the Year 2015 and the month is May; his complete registration number will look like this:
1-01/M05-2015-001
If two persons join the Export department in Lahore in the Year 2016 and the month is February; their complete registration numbers will look like this:
2-03/M02-2016-001
2-03/M02-2016-002
Now, you have to write a regular expression for all patterns accepted by the top management of XYZ Exporters and Co and generate five employee numbers.
b) After generating the regular expression in part(a), convert it into Finite Automata.
Step by step
Solved in 2 steps