ID2090 End Semester
ID2090 End Semester
1
ID2090: Introduction to Scientific Computing Jan-May 24
[10 marks] (d) A greedy approach would be choosing points nearer to the goal more likely. Implement this in RRT
algorithm. The nearer here can be any logical distance function such as L1 or L2 norm.
[10 marks] (e) Write a report on your implementation of the previous parts and give plots on the average number
of nodes needed to reach the goal - this is done by running the simulation a large number of times
and taking the average; a good number would be 1000 for each variant. Setup an environment as
shown Figure 1 to check your implementation of RRT from part 3 and write about it in the the
report
[10 marks] (b) Write a report on your implementation of a regular expression engine and give the finite state
machine’s state diagram for the below cases.
The FSM should be able to match:
[5 marks] (a) Direct matches
[5 marks] (b) Any number of characters
[10 marks] (c) Wildcard Character
[10 marks] (d) Multiple matches
2
ID2090: Introduction to Scientific Computing Jan-May 24
Input:
Test case 1:
Regular Expression: abcd
Sample string: abcdef
Test case 2:
Regular Expression: a*c*
Sample string: baacc
Test case 3:
Regular Expression: a*
Sample string: baaccaa
Sample Output:
Output 1:
abcd
Output 2:
baacc
Output 3:
baaccaa
1