Published in Infobahn : Volume 15, 2nd Edition, 2012
Time and again we programmers get stumped by simple problems. The efficiency of the application is not governed by the kind of hardware, operating system or the features of programming language but our choice of data structure and the way we organise our processes.
I remember the data structure which was used to generate timetable for train trips in a project I worked in London. It took me a long time to understand and appreciate the design made by the original developers. We had train routes, which had certain trains taking trips. Trip consisted of timing points, which in turn consisted of Site and Location. Location consisted of Site and Path.
In my current research project I was confronted with a specific problem as to how to design a data structure for a genetic algorithm which involved evolving images. I am currently on the seventh version of the Data Structure and am sure more modification will be needed enroute.
Lets us discuss in detail a thought exercise I had put across to students in an Advanced Data Structure Class for MCA students.
How to design a data structure for a Neuron which has to pass data from the palm of a hand to the human brain?
There are many scenarios I could envisage
Hand sensing severe pain to a mosquito bite. Hand feels cold, warmth and pressure. We can sense different things using our sense of touch. On the other extreme our hands “feel” numb too !!
What all information should we need to pass if were to design a node of such a data structure which will pass an information capsule to the brain
- Touch will require
- · Heat / Cold / Temperature (do we need three variables or one)
- · Pressure
- · Texture (Is this a struct in itself with lot of attributes, or a result of our brains very complicated AI algorithm)
- · Pain
- · Rupture (Is this different from pressure)
- · Tickling Sensation
If we were defining a C Struct for the same we may use integer data type to scale each of these parameters examples
Temperature: Can be an integer data type which stores level of heat or cold
Texture: A whole range of texture will need to be taught to the brain and use integers to classify them and another integer to range their distribution
Numbness: The absence of feeling. If nothing happens is there need to communicate!! That too from every location of the hand. Imagine the number of hits the brain would be receiving saying no problem, no problem, no problem ..........
Additionally we will need the following metadata
· We will either need time stamp or should we stick to instant messaging only
· Exact location (example: Right Hand , Third Finger, Middle Part, Front Side, 0.5 centimetre front left). How the brain comes to know the exact point a bee stung us is pretty amazing. Does the brain use some sophisticated co ordinate system?
The brains ability to make intelligent guesses is quiet over whelming. If we roll the following items in between our finger tips like mustard seed, red kidney beans or even a sugar crystal, can we not sense them?
Sense the texture by patting a coir mat, velvet cloth, metal grater, a boiled egg, curtain cover, child hand, dog’s fur and even a cow’s nose. Dip and feel if it is petrol, sugar syrup or water. Feel and make our way through a dark room. We can size up or weigh an object. Feel rain, breeze and hail. There is a lot learning which happens as a child grows and explores the world around. But to draw a parallel we cannot even teach a “bubble sort program” to grow up to be a Quick Sort leave alone an Operating System.
So I am sure the reader can appreciate the complexity of the data structure which is required to convey all this information to the control centre in the brain.
Corollary Exercise: In this article we discussed the data structure from Hand to Brain now Design a data structure for information flow from Brain to Hand?
No comments:
Post a Comment