If we were to ask a computer expert “What are the benefits of recursion?”, he would say it’s advantages are:
- Ease of writing far more legible and condensed code than the iterative counterpart
- Since it involves splitting up a problem into smaller sub-problems of a similar nature, it is very useful in many scenarios where there are enormous amounts of data for a single machine to complete in finite time. In addition, it you know how to solve part 1 of the problem and part 2 to ∞ is the same, then you just need to find the commonality and the computer would repeat it for the rest of the part without us coding it.
{e.g. If 2x2 ≡ 2+2 (adding the starting digit twice) and
2x3 ≡ 2+2+2 (adding the starting digit thrice) then
2xN ≡ 2+2+…..+2 (adding the starting digit ‘N’ rounds)}
Using recursion, we would be able to create self-contained applications and have the ability to use some algorithms related to robotics with greater depth in other fields
- Finding the shortest path
- GPS triangulation
- Image interpretation for machine vision
- User interface projection and on-time response
An example would be that each object has its own microprocessor embedded in them and only have the capacity to crunch maybe 2-5 lines of code/data. And each wearable item (jewellery, clothing, or accessory) would be able to communicate with themselves and the surrounding. Hence, the some of the computation would be shared amount the objects and the devices currently in the hand/clothing of the user. Thus the computation power would be directly proportional to the number of items worn by the user and data corruption is minimized due to the proximity between the various objects and the surrounding.
No comments:
Post a Comment