This is a Java desktop application. Two circuit boards (S and L), where S contains n power sources, while L contains LEDs n are given. The source S sorted in ascending order <1, 2, 3, … , n>, while the LEDs on L are not <2, 9, 5, 14, 3...>. The app connects each LED in L to its pair in S (i.e., 1 with 1, 2 with 2) through unshielded wires, thus when a wire connects a LED (li) in L with its corresponding source in S (si), it may prevent other LEDs from being connected (no two wires may cross).
Example as below, if you connected l1 with s1, then 3 LEDs maximum will be lightened.
In this project I used JavaFX For User Graphical inteface. Applied Longest Common Subsequence algorithm as a dynamic solution. This project is built as an assignment for Algorithm course.
In order to run the project, needs the JavaFx library to be build on the projecet path. The input of the program is: n (number of LEDs, say 100). A permutation of numbers (<1 to n>) :the ordering of the LEDs on the board L.
File format example 6 2 6 3 5 4 1
Connect the LEDS based on Maximum: