SlideShare a Scribd company logo
1 of 28
General Principles of the Sensory Systems and Perception
by Ken Koenigshofer, Ph.D.
Copyright 2004
Imagine that your brain was isolated from the external world.
Could you experience the world? The answer is "No." Could
you direct your behavior successfully (adaptively) in the world
if your brain was isolated from contact with the external world?
Again the answer is "No."
The brain, without sensory systems, is in fact isolated from the
world. After all, the brain is inside your skull, hidden away
from the external world. So, there must be systems that can get
information about the external world into your head.
We will consider several major ideas in this lecture. What I
want to do is to give you several principles that apply in general
to all of our sensory systems, and to the sensory systems of
most animals as well (and perhaps life forms elsewhere in the
universe if they exist).
If you can understand these general principles it will be easier
to learn the specific facts about each sensory system. In
addition, your understanding of these general principles will
also allow you to gain insight into some very interesting issues,
some of which border on the philosophical.
Have you heard the question posed, perhaps in a philosophy
class, "If a tree falls in a forest and there is no one there to hear
it, was there a sound?" You will be able to answer this and to
explain the rationale for your unexpected answer to others who
probably won't agree with you (you'll be able to convince
them!).
Well, let's get started.
Sensory systems are the input systems to the brain.
However, interestingly, the brain itself is completely insensitive
to the external world in its raw forms. The brain uses neural
code. It deals in neuron potentials. It cannot deal with the world
in its raw forms. Energies in the external world must be
converted into neuron potentials.
Here's what I mean. Imagine that you are a neurosurgeon. Like
others of your profession, when you do brain surgery, one of the
first steps is to open up the skull of your patient under a local
anesthetic, which deadens the scalp and the skull, but leaves
your patient conscious and alert. The reason this is possible is
because there are no pain receptors in the brain itself, but only
in the surrounding scalp, skull, and meninges (a three-layered
membrane covering the brain and attached to the skull). Now
imagine, that with the skull opened up and the brain exposed,
you direct a beam of light from a flashlight in the darkened
surgery room at the visual area of the brain, at the rear of it's
exposed surface (this is the primary visual cortex). To make this
example even more clear, imagine that your patient is
blindfolded. Would your patient "see" the light beam, which is
now striking and flooding with illumination the visual cells of
his or her brain?
I think you can see that, obviously, the patient does not see the
beam of light, even though the beam of light is flooding with
illumination the brain's visual cells (located in the Occipital
lobe at the very back of the head).
Why does the patient experience no visual sensation? After all
these cells in the primary visual cortex are the cells in the brain
upon which visual experience depends. Why doesn't stimulation
of these cells with light cause your patient to see? The answer is
that the brain itself, including even the visual parts of the brain,
is insensitive to the world and its energies, in their raw forms.
We can illustrate this same principle using other senses.
Imagine you plug the nose of your patient and then place a rose
or some dirty socks right beside the exposed olfactory cortex
(the cortex for smell). Will your patient smell the rose or dirty
socks? Again, I think you can see the answer is "no." Suppose
you pour chocolate syrup over your patient's taste cortex, will
the patient taste the chocolate? Again the answer is "No."
Suppose you place a thin slice of lemon on the surface of the
taste cortex. Will your patient taste the lemon? Again, no.
Why not? Again, the answer is that the brain itself is insensitive
to the world and its energies, in their raw forms.
What's necessary then is the conversion of the energies from
stimuli in the external world into a form that the brain can deal
with. From the lecture and chapter on the brain and nerve cells,
recall that the brain and its neurons use electrochemical signals,
neuron potentials, to code and process information.
Therefore, the first major step in any sensory system is the
conversion of environmental energy into neuron potentials. This
process is called transduction. The cells that perform
transduction of environmental energy into neuron potentials are
specialized neurons called sensory receptors.
There are different kinds of energy in the external world. Light
is a form of electromagnetic energy. Sound and touch depend
upon forms of mechanical energy, and taste and smell depend
upon chemical energies. Sensory receptors are specialized to
convert or transduce only one type of energy. Therefore, each of
the sensory systems must have its own specialized sensory
receptors. The job of the sensory receptors in each of the
sensory systems is to transduce or convert some specific form
of environmental energy into the brain's code, neuron
potentials.
In the visual system, the visual receptors, located at the back
inner surface of the eyeball, the retina, are of two major types--
rods and cones.
The auditory receptors, called "hair cells" and located in a
structure called the cochlea in the inner ear, transduce
mechanical energy in the form of vibrations in the air into
neuron potentials.
The touch receptors are located throughout the skin's surface all
over the body and convert mechanical energy from pressure on
the skin into neuron potentials. Temperature receptors in the
skin convert heat or cold into neuron potentials. And pain
receptors transduce any very intense and potentially injurious
stimulus into neuron potentials.
For the taste system, you can probably guess where the sensory
receptors for this sensory system are located. It is the taste
buds. The taste buds transduce chemical energies in chemicals
dissolved in saliva into neuron potentials.
The sensory organs, such as eyes and ears, are really accessory
organs severing the sensory receptors. These organs contain the
specialized nerve cells, the sensory receptors, whose function it
is to convert the raw energies in the external world into a form
the brain can handle.
The eye for example just focuses light upon the visual
receptors, the rods and cones in the retina at the back of the
eyeball, wherein the actual transduction, the crucial step,
occurs. The external ear just gathers vibrations in the air
("sound waves"). The structures of the inner ear magnify or
amplify the mechanical energy in the vibrations in the air before
it reaches the hair cells for transduction.
To summarize, we have identified three general principles in the
organization of sensory systems in animals and humans.
The brain is completely insensitive to the external world in its
raw forms. The brain can deal with information only if it is in
the form of brain code, neuron potentials.
Because of this, the first step in any sensory system is
transduction, the conversion of some specific form of
environmental energy into neuron potentials.
Each of the sensory systems has its own sensory receptors
"designed" to transduce one specific type of environmental
energy (mechanical, chemical, or electromagnetic--light for
example) into neuron potentials.
But these first three principles only take us to the point where
transduction has occurred in sensory receptors in sensory
organs. This alone is insufficient for us to have sensory
experience of the world. Could eyes not connected to the brain
see anything? Or ears not connected to the brain hear anything?
No. Seeing, hearing, touch and other skin sensations, tastes and
smells occur in the brain. Somehow, after transduction, the
resulting neuron potentials go to the brain and cause us to have
psychological experiences, internal mental states, conscious
sensations, which represent within our minds the external
world, in the form of sights, sounds, smells, and skin
sensations. How is this done? How do neuron potentials in our
brains become mental experiences representing the external
world to us?
Several additional general principles of sensory systems are
involved.
After transduction of some specific form of environmental
energy into neuron potentials, the resulting neuron potentials go
from the specific sensory organ (i.e. eye or ear, for example)
along specific sensory nerves (for example, the optic nerve in
the case of vision, the auditory nerve in the case of hearing) to
the brain, specifically to the Thalamus.
In mammals such as us, each of the senses, except the sense of
smell, has its own area of Thalamus, which receives neuron
potentials from the respective sensory organ. For example, in
the visual system, the part of the Thalamus that receives neuron
potentials from the optic nerve is called the LGN, lateral
geniculate nucleus. LGN is all you need to know. For the
auditory system, it is the MGN, medial geniculate nucleus, that
receives neuron potentials along the auditory nerve from the
inner ear. As stated above, each of the senses, except the sense
of smell, has its own specific area of thalamus. (Smell, the
olfactory sense, has an anatomical organization different from
the other senses and there is no area in the thalamus for the
sense of smell.) Information, coded in the form of neuron
potentials, from the various senses (except smell) is processed
in these sensory-specific regions of the thalamus.
After this processing in the thalamus, new neuron potentials
generated there are sent on to the cerebral cortex for additional
processing. In mammals, each area of thalamus (i.e. LGN,
MGN, etc.) "projects", sends neural impulses (action potentials;
see lecture and other materials on neuron potentials) to a
specific area of cerebral cortex for more processing. The
specific area of cortex that receives neural impulses from a
specific region of the thalamus is called the primary sensory
cortex for that sense. Each of the senses has its own primary
sensory cortex. For example, the area of cerebral cortex that
receives projections (nerve pathways carrying action potentials)
from the LGN is the primary visual cortex (in the occipital
lobe). The area of cortex that receives projections from the
MGN of the thalamus is the primary auditory cortex (located in
the temporal lobe). Interestingly, there is an orderly mapping of
the sensory surface of each sense onto the surface of the
respective primary sensory cortex. For example, the retina of
the eye is mapped in an orderly way onto the surface of the
primary visual cortex. For each point on the retina (the light
sensitive surface at the back inner surface of each eyeball,
containing the visual receptors--rods and cones), there is a
corresponding point on the primary visual cortex in the
Occipital lobe. Adjacent points on the retina have adjacent
points on the surface of the primary visual cortex. This point-
for-point mapping or representation of the retina (the visual
receptive surface) onto the primary visual cortex is called a
"retinotopic mapping." There is similar topographical mapping
of the other sensory surfaces onto their respective primary
sensory cortices. For example, the skin surface of the body is
laid out, point-for-point, on the surface of the primary
somatosensory cortex (located in the post-central gyrus of the
Parietal lobe). However, this "somatotopic" mapping is upside
down, but nevertheless orderly. In the auditory system, the
auditory receptors ("hair cells") are distributed over a
membrane, called the Basilar membrane, located inside the
cochlea in the inner ear. The orderly distribution of these hair
cells along the Basilar membrane is mapped in an orderly way
onto the surface of primary auditory cortex in the Temporal
lobe. These mappings of the sensory surfaces onto their
respective primary sensory cortex probably is important in the
coding of various features of sensory stimuli such as the
location of objects and their parts in visual space, the locations
of stimuli on the skin, and the frequencies of "sound" waves.
After information processing in primary sensory cortex,
additional information processing occurs in additional areas of
cerebral cortex. These areas, in turn, are called secondary
sensory cortex, third level (or tertiary) sensory cortex, fourth
level sensory cortex, etc. For example, in the visual system, the
primary visual cortex (also known as striate cortex or V1) is
located in the central area of the Occipital lobe at the back of
your head. Surrounding this area of cortex is secondary visual
cortex (V2). In addition, there are visual areas 3, 4, 5 and 6
(V5, for example, processes information that allows you to see
motion; in people with damage here, they can't see motion, but
only a series of still views in successively different positions).
In fact, it is estimated that in us, and in other primates, there
may be over thirty different areas of cortex involved in the later
stages of processing of visual information. One of these is the
Inferotemporal (IT) Cortex, involved in our ability to recognize
objects by sight alone. Damage there allows us to still see, but
we can't recognize what it is we are seeing (this disorder is
called visual agnosia).
After these steps in information processing, somehow the
resulting patterns of electrical activity occurring in large
populations of neurons (which make up complex circuits in the
brain) produce mental experiences of the external world.
(Mental experiences may be so-called "emergent properties" of
the structure and functioning of extremely complex circuits in
the brain--entirely material in structure and function). These
conscious, psychological experiences we have from the
operation of our sensory systems are called "sensory qualia."
For example, luminosity of light or colors of objects, both
produced by neural activity in visual areas of the brain, are
examples of visual qualia. Sounds, such as the sound of a
cricket chirping, are auditory qualia. Tastes such as the taste of
sugar or the taste of a lemon are taste qualia. There are also
somatosensory qualia (skin sensations) and olfactory qualia
(smells). Notice that all of the sensory qualia are produced
when patterns of neural impulses reach and activate the neurons
in a particular sensory cortex. Neural impulses are action
potentials and they are the same everywhere. The thing that
determines the nature of the sensory qualia, the type of sensory
experience that one has from a particular sensory input, is
where in the brain (which sensory cortex) the neural impulses,
from the sensory organs, end up. So, for example, if we could
somehow surgically redirect the optic nerves and connect them
to taste cortex, then sensations of taste, taste qualia, would
result when light was transduced by rods and cones in the eyes.
In other words, under these conditions, you would taste light,
not see it. If our nervous systems were in fact actually wired
this way, you would grow up thinking that light was tasty (just
like you think light is luminous and colored) and that different
wavelengths of light had different tastes. And you would be
right to say that light tasted, as right as you are when you say,
now, that light is luminous and colored. Which is to say, you
would be right, not at all. Light is neither tasty, nor luminous
and colored. These different properties which we would ascribe
to light are really properties of the activity of the neurons that
get activated in the presence of light.
These 8 general principles apply to all of our sensory systems
and to the sensory systems of all the mammals. Furthermore, the
first four also apply to the sensory systems of all animals in
general. However, some non-mammal species don't have a
thalamus, and no species, except mammal species, have cerebral
cortex. In species without cortex or thalamus, other brain
structures characteristic of those species carry out additional
processing of sensory information. Nevertheless, transduction
of environmental energies by sensory receptors into neuron
potentials which are then processed by additional neural
structures in the brain of the species is universal in all animals,
even invertebrates such as jellyfish and insects. Forms of life
which we might discover elsewhere in the universe someday
(alien life forms) may be expected to follow a similar
organization.
An extremely interesting and important thing to understand is
that:
Sensory qualia are entirely in your head (more accurately, in
your brain).
Although we grow up thinking that light is luminous and
colored, in fact it is not. Light in fact is no more luminous or
colored than X-rays or radio waves (both of which, like light,
are forms of electromagnetic energy). Luminosity (the glowing
quality that we attribute to light) and color are really properties
of the brain's response to light, not properties of light itself.
Light, in the external world, is really just as dark as other forms
of electromagnetic energy (the forms of electromagnetic energy
are gamma rays, X-rays, ultraviolet, visible light, infrared, T.V.
, radio, in order of increasing wavelength). The luminosity we
associate with light is not in the light, but results from brain
activity in the visual system of our brains. Luminosity and color
are not in the world at all, but are creations of our brains' visual
cortical neurons.
Here is a simple demonstration of this surprising fact that you
can do at home (but be careful not to hurt yourself). Here's what
to do. At night, go into your room, shut off the lights, then go
into your closet, close the door behind you, making sure the
closet light (if any) is off. Now, when you are sure that there is
absolutely no light at all reaching your eyes, whack yourself
hard on the back of your head. What happens? Well, you should
"see stars." These "stars" have a technical name; they are called
"phosphemes," sensations of luminosity and color. But look
what has happened. You are experiencing visual qualia
(luminosity and colors) in the complete absence of light. These
visual qualia are produced by the whack to the back of your
head, which activates neurons in the primary visual cortex. It is
the activation of those cells that produces luminosity and color,
even in the total absence of light. Somehow activation of those
visual cortical neurons by any means will produce in the mind
the visual qualia, luminosity and color. With this simple
demonstration, you have verified an astounding fact--luminosity
and color are not properties of light, but are properties of the
activation of visual cortical neurons.
Under normal conditions, light (remember, just a form of
electromagnetic energy) from the external world strikes the eyes
and is transduced by rods and cones into neuron potentials.
Those neuron potentials are transmitted along the optic nerve to
the LGN of the thalamus, and from there on to the visual cortex.
The activation of neurons in the visual cortex by neuron
potentials from the LGN causes the visual qualia, luminosity
and color. Luminosity and color don't exist in the external
world at all, and are not really properties of light at all, but
instead are properties of the activation of visual cortical
neurons in the brain. Thus, luminosity and color exist only
inside brains, not in the external world, not in light itself. I
know this may be hard to accept, but there is other more
scientific evidence, primarily from studies on the effects of
brain damage and brain stimulation in conscious patients during
brain surgery.
Electrical stimulation of the cortex in conscious human patients
during brain surgery causes different sensory qualia, different
sensory experiences, depending upon the area of sensory cortex
stimulated. Electrical stimulation of the visual cortex by the
neurosurgeon causes the patient to report "seeing" visual qualia
such as flashes of luminosity and color. Electrical stimulation
of the auditory cortex produces auditory qualia, sounds.
Electrical stimulation of the taste cortex produces mental
experiences of taste, taste qualia. Electrical stimulation of the
olfactory cortex produces olfactory sensations or qualia, smells.
All of these realistic sensory qualia can be produced in the total
absence of any of the corresponding external stimuli. That is, in
the absence of any light, or sound sources, or smelly or tasty
objects in the external world, realistic sensory experiences can
be produced by stimulation of sensory cortex. So, if the sensory
qualia can be produced in someone's mind just by stimulating
neurons in one sensory cortex or another, even in the absence of
any sensory stimuli in the external world, then those qualia
must be properties of brain activity, not properties of the
external world.
Similar conclusions can be drawn from observing the effects of
injury to sensory cortex. For example, damage to the primary
visual cortex causes blindness (called "cortical blindness").
Even though the eyes are still working normally, and there may
be plenty of light to illuminate objects in the person's field of
view, someone with total destruction of primary visual cortex is
completely blind--there is only darkness for the person with
total destruction of primary visual cortex; there are no longer
any visual qualia at all. Total destruction of the primary sensory
cortex of other senses produces similar loss of particular
sensory qualia.
With regard to color sensations similar arguments can be made.
The experience of different colors is really a brain code for
different wavelengths of light. (Light travels in waves through
space; the distance between adjacent wave peaks is the
wavelength of the light; the wavelength of light reflected from
an object depends upon the chemical composition and other
physical properties of the material out of which an object is
composed). Within our eyes we have rods and cones (the visual
receptors). There are three different types of cones (but just one
type of rod). Each type of cone is maximally sensitive
(maximally able to transduce) light waves within its own
particular range of wavelengths. "Color vision" begins when a
particular wavelength of reflected light gets transduced by a
particular set of cones. These, in turn, send a particular pattern
of neural impulses to specific neurons in the visual cortex (via
the LGN of the thalamus), which when stimulated produce the
mental experience of a particular color.
None of this occurs in the brain of a dog or a cow or many other
species which lack cones in their eyes (they have rods only). Is
our perception of reality more complete or more accurate than
that of the dog which lacks color vision? In one sense, the
answer is yes--we have the capacity to code the wavelength of
reflected light in the external world, the dog does not. But,
nevertheless, the "color" we experience in our minds only exists
there, not in the external world. So, in a way, we are somewhat
misled by our color perception. There are different wavelengths
of light, and it is adaptive for us to possess a mental code for
these different wavelengths. (It makes it very easy to see
ripened fruit against the leafy background of a tree, a real
advantage to our tree-living primate ancestors who also had
good "color" vision). But, the color in our minds is an illusion.
The light in the external world is not really colored, in fact, it is
not even luminous (it is as dark and non-luminous as X-rays or
radio waves). The luminosity of light, as we experience it, is
dependent upon the fact that light (a particular range of
wavelengths within the electromagnetic spectrum) gets
transduced by rods and cones leading to activation of visual
cortical neurons in our heads. If rods and cones were
constructed differently, so that they transduced a different range
of wavelengths within the electromagnetic spectrum, say, for
example, that range known as radio waves, then we would
experience radio waves as being luminous, and different
wavelengths of radio waves as different colors.
Regarding color specifically, here is something you can
demonstrate to yourself that will show that the visual qualia,
color, exists only inside brains.
Imagine being outside around sunset. You will notice that
objects in the environment still appear to have color. Trees still
appear green. Their trunks still appear some shade of brown.
You may see a red car parked nearby, and someone walks past
you in blue jeans. But as the sun sets, and the daylight fades
more and more, there comes a point at which the trees no longer
are green, other objects "lose" their colors, and all becomes
blacks and shades of gray, if there are no artificial sources of
light, as would be the case in the desert or mountains away from
city lights. It is about 9 p.m. as I write this. A moment ago, I
stepped outside. I saw a large tree. The shape of the tree
including some of its leaves was clearly visible, but the tree was
completely black and gray. There was no color at all.
Now, think about this. Where did the color go? The answer is, it
really wasn't there to begin with. What has happened, as the
intensity of light drops off, is that color-generating systems in
the brain and nervous system shut down. When the color-
generating systems in the brain and nervous system shut down,
the color disappears because the color was only in your head
(your brain) in the first place, never really in the external world
at all.
It is known that the visual receptors that are involved in color
perception, the cones, can only transduce the higher levels of
light typical of daylight. At night, there is insufficient light to
cause transduction in the cones, but still enough for
transduction by the rods. Cones activate parts of the visual
system, at the level of the LGN and visual cortex, which
generate color qualia, sensations of color. Without the
activation of these brain systems, there is no color. You
experience this absence of color firsthand at night (if there are
no artificial light sources to raise levels of light to the threshold
necessary to activate the cones and their associated color
generating circuits in the brain). Color, like luminosity, or
sound, or tastes and smells or sensations on the skin, exist only
inside living, functioning brains.
During brain surgery, patients who have their primary
somatosensory cortex stimulated report feeling things at various
places on their skin. In one case which I witnessed (via a film
of the surgery), the patient said with astonishment, when a point
on his somatosensory cortex was stimulated, "I feel something
on my teeth." When a nearby point on the same cortex was
stimulated a moment later, he said with equal astonishment,
"Now, it's on my tongue. I feel something on my tongue!" There
was nothing on his teeth or on his tongue. The realistic feeling
of something on the teeth or tongue was due to electrical
stimulation of different, but nearby, regions of primary
somatosensory cortex.
The lesson of these examples is that the world that we know and
experience is really in our heads (more accurately, in our brain
function). The color, the luminosity, the tastes, the smells and
other sensory qualia are not properties of the external world or
the things in it, but properties produced by the activity of nerve
cells organized into complex circuits in the brain.
By these arguments, I'm not denying that there is an external
world out there, outside our heads, I'm just saying that it doesn't
really look, sound, smell, feel, or taste the way we think it does.
In the objective world outside our heads, none of these
subjective properties actually exist. So what does the world
outside our heads really look like? It doesn't really look like
anything, independent of the properties of the "looker", the
brain and nervous system that is doing the looking. What the
world or anything else looks like is dependent as much upon the
properties of the nervous system doing the looking as it is upon
properties of the things being looked at. The world looks one
way to a bee, another way to a snake, another way to a dog,
another way to a bat, another way still to us. In each case, the
nervous system creates a representation, a model, of the
external world, the function of which is guide adaptive behavior
of the organism. Natural selection "designed" nervous systems
for that adaptive "purpose", not to give the organism an
objective model of absolute Reality with a capital R. Reality is
species-specific. Each species' nervous system represents the
aspects of the world important for the organization of successful
behavioral adaptation for that species, within the environmental
niche occupied by that species.
However, in spite of species differences in sensory systems and
resulting differences in the representation of reality for each
species, there are also likely to be aspects of the external world
that are represented in similar ways across a broad range of
species. These aspects of reality would be those which are more
or less universal to the environmental niches of a broad range of
species. For example, representation by the brain of
gravitational forces and their direction is something that is
probably universally found in a very broad range of species of
animal life on earth.
This is pretty abstract and somewhat speculative stuff. Let's
make it a bit more concrete. Let's consider the classic
philosophical question: "If a tree falls in the forest, and there is
no one [no brain] to hear it, is there a sound?" Go to the main
topic in this conference with the appropriate title to respond to
this question.
YOUR TASK: Here, just tell me and your classmates that you
have read this lecture, and then briefly describe two ideas or
facts that you found most interesting or important and in
addition, post any questions or comments about the lecture that
you may have.
Word doc and .java/BST.javaWord doc and .java/BST.java
// Liang -
Introduction to Java Programming, 9th Edition (Code Examples
of Chapter 27 Binary Search Trees)
// Source code of the examples available at:
// http://www.cs.armstrong.edu/liang/intro9e/examplesource.htm
l
publicclass BST<E extendsComparable<E>>{
protectedTreeNode<E> root;
protectedint size =0;
/** Create a default binary tree */
public BST(){
}
/** Create a binary tree from an array of objects */
public BST(E[] objects){
for(int i =0; i < objects.length; i++)
insert(objects[i]);
}
/** Returns true if the element is in the tree */
publicboolean search(E e){
TreeNode<E> current = root;// Start from the root
while(current !=null){
if(e.compareTo(current.element)<0){
current = current.left;
}
elseif(e.compareTo(current.element)>0){
current = current.right;
}
else// element matches current.element
returntrue;// Element is found
}
returnfalse;
}
/** Insert element o into the binary tree
* Return true if the element is inserted successfully */
publicboolean insert(E e){
if(root ==null)
root = createNewNode(e);// Create a new root
else{
// Locate the parent node
TreeNode<E> parent =null;
TreeNode<E> current = root;
while(current !=null)
if(e.compareTo(current.element)<0){
parent = current;
current = current.left;
}
elseif(e.compareTo(current.element)>0){
parent = current;
current = current.right;
}
else
returnfalse;// Duplicate node not inserted
// Create the new node and attach it to the parent node
if(e.compareTo(parent.element)<0)
parent.left = createNewNode(e);
else
parent.right = createNewNode(e);
}
size++;
returntrue;// Element inserted
}
protectedTreeNode<E> createNewNode(E e){
returnnewTreeNode<E>(e);
}
/** Inorder traversal from the root*/
publicvoid inorder(){
inorder(root);
}
/** Inorder traversal from a subtree */
protectedvoid inorder(TreeNode<E> root){
if(root ==null)return;
inorder(root.left);
System.out.print(root.element +" ");
inorder(root.right);
}
/** Postorder traversal from the root */
publicvoid postorder(){
postorder(root);
}
/** Postorder traversal from a subtree */
protectedvoid postorder(TreeNode<E> root){
if(root ==null)return;
postorder(root.left);
postorder(root.right);
System.out.print(root.element +" ");
}
/** Preorder traversal from the root */
publicvoid preorder(){
preorder(root);
}
/** Preorder traversal from a subtree */
protectedvoid preorder(TreeNode<E> root){
if(root ==null)return;
System.out.print(root.element +" ");
preorder(root.left);
preorder(root.right);
}
/** This inner class is static, because it does not access
any instance members defined in its outer class */
publicstaticclassTreeNode<E extendsComparable<E>>{
protected E element;
protectedTreeNode<E> left;
protectedTreeNode<E> right;
publicTreeNode(E e){
element = e;
}
}
/** Get the number of nodes in the tree */
publicint getSize(){
return size;
}
/** Returns the root of the tree */
publicTreeNode<E> getRoot(){
return root;
}
/** Returns a path from the root leading to the specified elemen
t */
public java.util.ArrayList<TreeNode<E>> path(E e){
java.util.ArrayList<TreeNode<E>> list =
new java.util.ArrayList<TreeNode<E>>();
TreeNode<E> current = root;// Start from the root
while(current !=null){
list.add(current);// Add the node to the list
if(e.compareTo(current.element)<0){
current = current.left;
}
elseif(e.compareTo(current.element)>0){
current = current.right;
}
else
break;
}
return list;// Return an array of nodes
}
/** Delete an element from the binary tree.
* Return true if the element is deleted successfully
* Return false if the element is not in the tree */
publicboolean delete(E e){
// Locate the node to be deleted and also locate its parent node
TreeNode<E> parent =null;
TreeNode<E> current = root;
while(current !=null){
if(e.compareTo(current.element)<0){
parent = current;
current = current.left;
}
elseif(e.compareTo(current.element)>0){
parent = current;
current = current.right;
}
else
break;// Element is in the tree pointed at by current
}
if(current ==null)
returnfalse;// Element is not in the tree
// Case 1: current has no left children
if(current.left ==null){
// Connect the parent with the right child of the current node
if(parent ==null){
root = current.right;
}
else{
if(e.compareTo(parent.element)<0)
parent.left = current.right;
else
parent.right = current.right;
}
}
else{
// Case 2: The current node has a left child
// Locate the rightmost node in the left subtree of
// the current node and also its parent
TreeNode<E> parentOfRightMost = current;
TreeNode<E> rightMost = current.left;
while(rightMost.right !=null){
parentOfRightMost = rightMost;
rightMost = rightMost.right;// Keep going to the right
}
// Replace the element in current by the element in rightMost
current.element = rightMost.element;
// Eliminate rightmost node
if(parentOfRightMost.right == rightMost)
parentOfRightMost.right = rightMost.left;
else
// Special case: parentOfRightMost == current
parentOfRightMost.left = rightMost.left;
}
size--;
returntrue;// Element inserted
}
/** Obtain an iterator. Use inorder. */
public java.util.Iterator<E> iterator(){
returnnewInorderIterator();
}
// Inner class InorderIterator
privateclassInorderIteratorimplements java.util.Iterator<E>{
// Store the elements in a list
private java.util.ArrayList<E> list =
new java.util.ArrayList<E>();
privateint current =0;// Point to the current element in list
publicInorderIterator(){
inorder();// Traverse binary tree and store elements in list
}
/** Inorder traversal from the root*/
privatevoid inorder(){
inorder(root);
}
/** Inorder traversal from a subtree */
privatevoid inorder(TreeNode<E> root){
if(root ==null)return;
inorder(root.left);
list.add(root.element);
inorder(root.right);
}
/** More elements for traversing? */
publicboolean hasNext(){
if(current < list.size())
returntrue;
returnfalse;
}
/** Get the current element and move to the next */
public E next(){
return list.get(current++);
}
/** Remove the current element */
publicvoid remove(){
delete(list.get(current));// Delete the current element
list.clear();// Clear the list
inorder();// Rebuild the list
}
}
/** Remove all elements from the tree */
publicvoid clear(){
root =null;
size =0;
}
}
Word doc and .java/homework 9JUN2016.docx
Balancing Binary Search Trees
1. Specification
The search effort for locating a node in a Binary Search Tree
(BST) depends on the tree shape (topology). For a BST
with n nodes the ACE value is defined (Wiener and Pinson) as
the Average Comparison Effort for locating a node in a tree
by summing all comparison operations for all tree nodes and
dividing the result by the total number of tree nodes:
for (int level = 0, sum = 0; level < treeHeight; level++ ) {
sum += numberOfNodesAtLevel(level) * (level + 1)
}
ACE = sum / n
When the average comparison effort (i.e. the ACE value) gets
over a certain threshold or after a certain number of tree
insert/delete operations, for optimizing the search process, a
tree balance operation should be executed resulting a tree
whose height equals |_ log n _| + 1 (or floor(log n) + 1), thus
requiring at most |_ log n _| + 1 (or floor(log n) + 1)
comparison operations to identify any tree node.
For a given BST with n nodes we define MinACE as the
minimum value of ACE and MaxACE as the maximum value of
ACE. MinACE value for a BST with n nodes, corresponds to the
ACE value calculated for a BST of height floor(log n) + 1
which has all levels completely full, except for the last level.
The ACE value of a balanced BST equals MinACE. MaxACE
value for a BST with n nodes corresponds to the ACE value
calculated for a BST which degenerates into a linear linked list
with n nodes.
Part 1
Consider the attached file BST.java which defines a generic
BST class.
Enhance the BST class with the following methods:
· treeHeight, calculates tree height;
· nodeBalanceLevel calculates the balance level of a user
specified node as the difference between the height of its left
subtree and the height of its right subtree;
· numberOfNodesAtLevel calculates the number of nodes at the
specified level;
· calculateACE, calculates the ACE value according to the
above algorithm;
· calculateMinACE, calculates the minimum value of the ACE;
· calculateMaxACE, calculates the maximum value of the ACE;
· needsBalancing, evaluates whether this BST needs to be
balanced or not. We consider that a BST needs to be balanced
when its ACE value is greater than K * MinACE where K =
1.28;
· doBalanceBST, executes the balance operation on this BST;
Additional methods may be added if necessary.
The enhanced BST class should compile without errors.
Part 2
Design and implement a driver program TestBST for testing the
methods implemented in Part 1. The driver program
should build an initial BST whose nodes contain positive
integer values taken from an input file. In the input file, the
values should be separated by the semicolon character. After
building the BST, in a loop, the program should invite the
user to select for execution one of the following operations: (1)
in-order tree traversal, (2) pre-order tree traversal, (3)
calculateACE, (4) calculateMinACE, (5) calculateMaxACE, (6)
numberOfNodesAtLevel, (7) treeHeight, (8)
nodeBalanceLevel (9) needsBalancing, (10) doBalanceBST, (11)
insert value, and (0) exit the loop and the program.
As a result of each operation execution, relevant information
will be displayed to the user. For example, as a result of
executing the in-order traversal, the values of the tree nodes
should be shown to the console or, as a result of executing
the calculateACE operation, the ACE value should be displayed
to the console.
Notes.
1. If an operation requires additional information, the user will
be prompted to enter it.
2. The input file (a simple .txt file) should be generated by the
students using a simple text editor such as Notepad.
3. You may assume that there are no errors in the input file
structure.
4. Tree root is considered as located at level 0. Tree height will
be calculated by counting the nodes, starting with the
root, along the longest path.
2. Submission requirements
Submit the following before the due date listed in the Calendar:
1. All .java source files and the input file. The source code
should use Java code conventions and appropriate code layout
(white space management and indents) and comments.
2. The solution description document <YourSecondName>_P2
(.pdf or .doc / .docx) containing:
(2.1) assumptions, main design decisions, error handling; (2.2)
test cases and two relevant screenshots; (2.3) lessons
learned and (2.4) possible improvements. The size of the
document file (including the screenshots) should be of 3 pages,
single spaced, font size 10
Grading requirements:
Design (20 points):
Employs Modularity (including proper use of parameters, use of
local variables etc.) most of the time
Employs correct & appropriate use of programming structures
(loops, conditionals, classes etc.) most of the time
Efficient algorithms used most of the time
Excellent use of object-oriented design
Functionality (20 points):
Program fulfills all functionality
All requirements were fulfilled
Extra effort was apparent
Test Plan (20 points):
Comprehensive test plan.
Documentation (20 points):
Excellent comments
Comprehensive lessons learned
Excellent possible improvements included
Excellent approach discussion and references
General Principles of the Sensory Systems and Perceptionby Ken.docx

More Related Content

Similar to General Principles of the Sensory Systems and Perceptionby Ken.docx

Physiology Of Nervous System
Physiology Of Nervous SystemPhysiology Of Nervous System
Physiology Of Nervous SystemArif WR
 
Psych 101 - Introduction to Psychology - Lecture 4
Psych 101 - Introduction to Psychology - Lecture 4Psych 101 - Introduction to Psychology - Lecture 4
Psych 101 - Introduction to Psychology - Lecture 4WhatisPsychology
 
The nervous system
The nervous systemThe nervous system
The nervous systemAlifya F
 
Vertebrate Nervous System new 1 - Copy.pptx
Vertebrate Nervous System new 1 - Copy.pptxVertebrate Nervous System new 1 - Copy.pptx
Vertebrate Nervous System new 1 - Copy.pptxHassanRaza759613
 
Anatomy and physiology of animals
Anatomy and physiology of animalsAnatomy and physiology of animals
Anatomy and physiology of animalsbaharia said
 

Similar to General Principles of the Sensory Systems and Perceptionby Ken.docx (12)

Myers10e ls-ch02-1
Myers10e ls-ch02-1Myers10e ls-ch02-1
Myers10e ls-ch02-1
 
Nervous system
Nervous systemNervous system
Nervous system
 
Physiology Of Nervous System
Physiology Of Nervous SystemPhysiology Of Nervous System
Physiology Of Nervous System
 
Sensory system
Sensory systemSensory system
Sensory system
 
Nervous system
Nervous systemNervous system
Nervous system
 
Psych 101 - Introduction to Psychology - Lecture 4
Psych 101 - Introduction to Psychology - Lecture 4Psych 101 - Introduction to Psychology - Lecture 4
Psych 101 - Introduction to Psychology - Lecture 4
 
The nervous system
The nervous systemThe nervous system
The nervous system
 
Neurons -Types.pptx
Neurons -Types.pptxNeurons -Types.pptx
Neurons -Types.pptx
 
Vertebrate Nervous System new 1 - Copy.pptx
Vertebrate Nervous System new 1 - Copy.pptxVertebrate Nervous System new 1 - Copy.pptx
Vertebrate Nervous System new 1 - Copy.pptx
 
The Cerebrum
The CerebrumThe Cerebrum
The Cerebrum
 
B. sensation and perception
B. sensation and perceptionB. sensation and perception
B. sensation and perception
 
Anatomy and physiology of animals
Anatomy and physiology of animalsAnatomy and physiology of animals
Anatomy and physiology of animals
 

More from hanneloremccaffery

 Explain how firms can benefit from forecastingexchange rates .docx
 Explain how firms can benefit from forecastingexchange rates .docx Explain how firms can benefit from forecastingexchange rates .docx
 Explain how firms can benefit from forecastingexchange rates .docxhanneloremccaffery
 
•POL201 •Discussions •Week 5 - DiscussionVoter and Voter Tu.docx
•POL201 •Discussions •Week 5 - DiscussionVoter and Voter Tu.docx•POL201 •Discussions •Week 5 - DiscussionVoter and Voter Tu.docx
•POL201 •Discussions •Week 5 - DiscussionVoter and Voter Tu.docxhanneloremccaffery
 
•No less than 4 pages causal argument researched essay •In.docx
•No less than 4 pages causal argument researched essay •In.docx•No less than 4 pages causal argument researched essay •In.docx
•No less than 4 pages causal argument researched essay •In.docxhanneloremccaffery
 
•Focus on two or three things in the Mesopotamian andor Ovids ac.docx
•Focus on two or three things in the Mesopotamian andor Ovids ac.docx•Focus on two or three things in the Mesopotamian andor Ovids ac.docx
•Focus on two or three things in the Mesopotamian andor Ovids ac.docxhanneloremccaffery
 
•Langbein, L. (2012). Public program evaluation A statistical guide.docx
•Langbein, L. (2012). Public program evaluation A statistical guide.docx•Langbein, L. (2012). Public program evaluation A statistical guide.docx
•Langbein, L. (2012). Public program evaluation A statistical guide.docxhanneloremccaffery
 
•Chapter 10 Do you think it is possible for an outsider to accura.docx
•Chapter 10 Do you think it is possible for an outsider to accura.docx•Chapter 10 Do you think it is possible for an outsider to accura.docx
•Chapter 10 Do you think it is possible for an outsider to accura.docxhanneloremccaffery
 
·         Bakit Di gaanong kaganda ang pagturo sa UST sa panahon.docx
·         Bakit Di gaanong kaganda ang pagturo sa UST sa panahon.docx·         Bakit Di gaanong kaganda ang pagturo sa UST sa panahon.docx
·         Bakit Di gaanong kaganda ang pagturo sa UST sa panahon.docxhanneloremccaffery
 
·YOUR INDIVIDUAL PAPER IS ARGUMENTATIVE OR POSITIONAL(Heal.docx
·YOUR INDIVIDUAL PAPER IS ARGUMENTATIVE OR POSITIONAL(Heal.docx·YOUR INDIVIDUAL PAPER IS ARGUMENTATIVE OR POSITIONAL(Heal.docx
·YOUR INDIVIDUAL PAPER IS ARGUMENTATIVE OR POSITIONAL(Heal.docxhanneloremccaffery
 
·Write a 750- to 1,Write a 750- to 1,200-word paper that.docx
·Write a 750- to 1,Write a 750- to 1,200-word paper that.docx·Write a 750- to 1,Write a 750- to 1,200-word paper that.docx
·Write a 750- to 1,Write a 750- to 1,200-word paper that.docxhanneloremccaffery
 
[Type here]Ok. This school makes me confused. The summary of t.docx
[Type here]Ok. This school makes me confused. The summary of t.docx[Type here]Ok. This school makes me confused. The summary of t.docx
[Type here]Ok. This school makes me confused. The summary of t.docxhanneloremccaffery
 
© 2020 Cengage Learning®. May not be scanned, copied or duplic.docx
© 2020 Cengage Learning®. May not be scanned, copied or duplic.docx© 2020 Cengage Learning®. May not be scanned, copied or duplic.docx
© 2020 Cengage Learning®. May not be scanned, copied or duplic.docxhanneloremccaffery
 
© 2016 Laureate Education, Inc. Page 1 of 3 RWRCOEL Prof.docx
© 2016 Laureate Education, Inc.   Page 1 of 3 RWRCOEL Prof.docx© 2016 Laureate Education, Inc.   Page 1 of 3 RWRCOEL Prof.docx
© 2016 Laureate Education, Inc. Page 1 of 3 RWRCOEL Prof.docxhanneloremccaffery
 
© 2022 Post University, ALL RIGHTS RESERVED Due Date.docx
© 2022 Post University, ALL RIGHTS RESERVED  Due Date.docx© 2022 Post University, ALL RIGHTS RESERVED  Due Date.docx
© 2022 Post University, ALL RIGHTS RESERVED Due Date.docxhanneloremccaffery
 
{DiscriminationGENERAL DISCRIMINATI.docx
{DiscriminationGENERAL DISCRIMINATI.docx{DiscriminationGENERAL DISCRIMINATI.docx
{DiscriminationGENERAL DISCRIMINATI.docxhanneloremccaffery
 
~UEER THEORY AND THE JEWISH QUESTI01 Daniel Boyarin, Da.docx
~UEER THEORY AND THE JEWISH QUESTI01 Daniel Boyarin, Da.docx~UEER THEORY AND THE JEWISH QUESTI01 Daniel Boyarin, Da.docx
~UEER THEORY AND THE JEWISH QUESTI01 Daniel Boyarin, Da.docxhanneloremccaffery
 
© 2017 Cengage Learning. All Rights Reserved.Chapter Twelve.docx
©  2017 Cengage Learning. All Rights Reserved.Chapter Twelve.docx©  2017 Cengage Learning. All Rights Reserved.Chapter Twelve.docx
© 2017 Cengage Learning. All Rights Reserved.Chapter Twelve.docxhanneloremccaffery
 
`HISTORY 252AEarly Modern Europe from 1500 to 1815Dr. Burton .docx
`HISTORY 252AEarly Modern Europe from 1500 to 1815Dr. Burton .docx`HISTORY 252AEarly Modern Europe from 1500 to 1815Dr. Burton .docx
`HISTORY 252AEarly Modern Europe from 1500 to 1815Dr. Burton .docxhanneloremccaffery
 
^ Acadumy of Management Journal2001. Vol. 44. No. 2. 219-237.docx
^ Acadumy of Management Journal2001. Vol. 44. No. 2. 219-237.docx^ Acadumy of Management Journal2001. Vol. 44. No. 2. 219-237.docx
^ Acadumy of Management Journal2001. Vol. 44. No. 2. 219-237.docxhanneloremccaffery
 
__MACOSXSujan Poster._CNA320 Poster Presentation rubric.pdf.docx
__MACOSXSujan Poster._CNA320 Poster Presentation rubric.pdf.docx__MACOSXSujan Poster._CNA320 Poster Presentation rubric.pdf.docx
__MACOSXSujan Poster._CNA320 Poster Presentation rubric.pdf.docxhanneloremccaffery
 

More from hanneloremccaffery (20)

 Explain how firms can benefit from forecastingexchange rates .docx
 Explain how firms can benefit from forecastingexchange rates .docx Explain how firms can benefit from forecastingexchange rates .docx
 Explain how firms can benefit from forecastingexchange rates .docx
 
•POL201 •Discussions •Week 5 - DiscussionVoter and Voter Tu.docx
•POL201 •Discussions •Week 5 - DiscussionVoter and Voter Tu.docx•POL201 •Discussions •Week 5 - DiscussionVoter and Voter Tu.docx
•POL201 •Discussions •Week 5 - DiscussionVoter and Voter Tu.docx
 
•No less than 4 pages causal argument researched essay •In.docx
•No less than 4 pages causal argument researched essay •In.docx•No less than 4 pages causal argument researched essay •In.docx
•No less than 4 pages causal argument researched essay •In.docx
 
•Focus on two or three things in the Mesopotamian andor Ovids ac.docx
•Focus on two or three things in the Mesopotamian andor Ovids ac.docx•Focus on two or three things in the Mesopotamian andor Ovids ac.docx
•Focus on two or three things in the Mesopotamian andor Ovids ac.docx
 
•Langbein, L. (2012). Public program evaluation A statistical guide.docx
•Langbein, L. (2012). Public program evaluation A statistical guide.docx•Langbein, L. (2012). Public program evaluation A statistical guide.docx
•Langbein, L. (2012). Public program evaluation A statistical guide.docx
 
•Chapter 10 Do you think it is possible for an outsider to accura.docx
•Chapter 10 Do you think it is possible for an outsider to accura.docx•Chapter 10 Do you think it is possible for an outsider to accura.docx
•Chapter 10 Do you think it is possible for an outsider to accura.docx
 
·         Bakit Di gaanong kaganda ang pagturo sa UST sa panahon.docx
·         Bakit Di gaanong kaganda ang pagturo sa UST sa panahon.docx·         Bakit Di gaanong kaganda ang pagturo sa UST sa panahon.docx
·         Bakit Di gaanong kaganda ang pagturo sa UST sa panahon.docx
 
·YOUR INDIVIDUAL PAPER IS ARGUMENTATIVE OR POSITIONAL(Heal.docx
·YOUR INDIVIDUAL PAPER IS ARGUMENTATIVE OR POSITIONAL(Heal.docx·YOUR INDIVIDUAL PAPER IS ARGUMENTATIVE OR POSITIONAL(Heal.docx
·YOUR INDIVIDUAL PAPER IS ARGUMENTATIVE OR POSITIONAL(Heal.docx
 
·Write a 750- to 1,Write a 750- to 1,200-word paper that.docx
·Write a 750- to 1,Write a 750- to 1,200-word paper that.docx·Write a 750- to 1,Write a 750- to 1,200-word paper that.docx
·Write a 750- to 1,Write a 750- to 1,200-word paper that.docx
 
[Type here]Ok. This school makes me confused. The summary of t.docx
[Type here]Ok. This school makes me confused. The summary of t.docx[Type here]Ok. This school makes me confused. The summary of t.docx
[Type here]Ok. This school makes me confused. The summary of t.docx
 
© 2020 Cengage Learning®. May not be scanned, copied or duplic.docx
© 2020 Cengage Learning®. May not be scanned, copied or duplic.docx© 2020 Cengage Learning®. May not be scanned, copied or duplic.docx
© 2020 Cengage Learning®. May not be scanned, copied or duplic.docx
 
© 2016 Laureate Education, Inc. Page 1 of 3 RWRCOEL Prof.docx
© 2016 Laureate Education, Inc.   Page 1 of 3 RWRCOEL Prof.docx© 2016 Laureate Education, Inc.   Page 1 of 3 RWRCOEL Prof.docx
© 2016 Laureate Education, Inc. Page 1 of 3 RWRCOEL Prof.docx
 
© 2022 Post University, ALL RIGHTS RESERVED Due Date.docx
© 2022 Post University, ALL RIGHTS RESERVED  Due Date.docx© 2022 Post University, ALL RIGHTS RESERVED  Due Date.docx
© 2022 Post University, ALL RIGHTS RESERVED Due Date.docx
 
{DiscriminationGENERAL DISCRIMINATI.docx
{DiscriminationGENERAL DISCRIMINATI.docx{DiscriminationGENERAL DISCRIMINATI.docx
{DiscriminationGENERAL DISCRIMINATI.docx
 
~UEER THEORY AND THE JEWISH QUESTI01 Daniel Boyarin, Da.docx
~UEER THEORY AND THE JEWISH QUESTI01 Daniel Boyarin, Da.docx~UEER THEORY AND THE JEWISH QUESTI01 Daniel Boyarin, Da.docx
~UEER THEORY AND THE JEWISH QUESTI01 Daniel Boyarin, Da.docx
 
© 2017 Cengage Learning. All Rights Reserved.Chapter Twelve.docx
©  2017 Cengage Learning. All Rights Reserved.Chapter Twelve.docx©  2017 Cengage Learning. All Rights Reserved.Chapter Twelve.docx
© 2017 Cengage Learning. All Rights Reserved.Chapter Twelve.docx
 
`HISTORY 252AEarly Modern Europe from 1500 to 1815Dr. Burton .docx
`HISTORY 252AEarly Modern Europe from 1500 to 1815Dr. Burton .docx`HISTORY 252AEarly Modern Europe from 1500 to 1815Dr. Burton .docx
`HISTORY 252AEarly Modern Europe from 1500 to 1815Dr. Burton .docx
 
^ Acadumy of Management Journal2001. Vol. 44. No. 2. 219-237.docx
^ Acadumy of Management Journal2001. Vol. 44. No. 2. 219-237.docx^ Acadumy of Management Journal2001. Vol. 44. No. 2. 219-237.docx
^ Acadumy of Management Journal2001. Vol. 44. No. 2. 219-237.docx
 
`Inclusiveness. The main.docx
`Inclusiveness. The main.docx`Inclusiveness. The main.docx
`Inclusiveness. The main.docx
 
__MACOSXSujan Poster._CNA320 Poster Presentation rubric.pdf.docx
__MACOSXSujan Poster._CNA320 Poster Presentation rubric.pdf.docx__MACOSXSujan Poster._CNA320 Poster Presentation rubric.pdf.docx
__MACOSXSujan Poster._CNA320 Poster Presentation rubric.pdf.docx
 

Recently uploaded

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 

Recently uploaded (20)

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 

General Principles of the Sensory Systems and Perceptionby Ken.docx

  • 1. General Principles of the Sensory Systems and Perception by Ken Koenigshofer, Ph.D. Copyright 2004 Imagine that your brain was isolated from the external world. Could you experience the world? The answer is "No." Could you direct your behavior successfully (adaptively) in the world if your brain was isolated from contact with the external world? Again the answer is "No." The brain, without sensory systems, is in fact isolated from the world. After all, the brain is inside your skull, hidden away from the external world. So, there must be systems that can get information about the external world into your head. We will consider several major ideas in this lecture. What I want to do is to give you several principles that apply in general to all of our sensory systems, and to the sensory systems of most animals as well (and perhaps life forms elsewhere in the universe if they exist). If you can understand these general principles it will be easier to learn the specific facts about each sensory system. In addition, your understanding of these general principles will also allow you to gain insight into some very interesting issues, some of which border on the philosophical. Have you heard the question posed, perhaps in a philosophy class, "If a tree falls in a forest and there is no one there to hear it, was there a sound?" You will be able to answer this and to explain the rationale for your unexpected answer to others who
  • 2. probably won't agree with you (you'll be able to convince them!). Well, let's get started. Sensory systems are the input systems to the brain. However, interestingly, the brain itself is completely insensitive to the external world in its raw forms. The brain uses neural code. It deals in neuron potentials. It cannot deal with the world in its raw forms. Energies in the external world must be converted into neuron potentials. Here's what I mean. Imagine that you are a neurosurgeon. Like others of your profession, when you do brain surgery, one of the first steps is to open up the skull of your patient under a local anesthetic, which deadens the scalp and the skull, but leaves your patient conscious and alert. The reason this is possible is because there are no pain receptors in the brain itself, but only in the surrounding scalp, skull, and meninges (a three-layered membrane covering the brain and attached to the skull). Now imagine, that with the skull opened up and the brain exposed, you direct a beam of light from a flashlight in the darkened surgery room at the visual area of the brain, at the rear of it's exposed surface (this is the primary visual cortex). To make this example even more clear, imagine that your patient is blindfolded. Would your patient "see" the light beam, which is now striking and flooding with illumination the visual cells of his or her brain? I think you can see that, obviously, the patient does not see the beam of light, even though the beam of light is flooding with illumination the brain's visual cells (located in the Occipital lobe at the very back of the head). Why does the patient experience no visual sensation? After all
  • 3. these cells in the primary visual cortex are the cells in the brain upon which visual experience depends. Why doesn't stimulation of these cells with light cause your patient to see? The answer is that the brain itself, including even the visual parts of the brain, is insensitive to the world and its energies, in their raw forms. We can illustrate this same principle using other senses. Imagine you plug the nose of your patient and then place a rose or some dirty socks right beside the exposed olfactory cortex (the cortex for smell). Will your patient smell the rose or dirty socks? Again, I think you can see the answer is "no." Suppose you pour chocolate syrup over your patient's taste cortex, will the patient taste the chocolate? Again the answer is "No." Suppose you place a thin slice of lemon on the surface of the taste cortex. Will your patient taste the lemon? Again, no. Why not? Again, the answer is that the brain itself is insensitive to the world and its energies, in their raw forms. What's necessary then is the conversion of the energies from stimuli in the external world into a form that the brain can deal with. From the lecture and chapter on the brain and nerve cells, recall that the brain and its neurons use electrochemical signals, neuron potentials, to code and process information. Therefore, the first major step in any sensory system is the conversion of environmental energy into neuron potentials. This process is called transduction. The cells that perform transduction of environmental energy into neuron potentials are specialized neurons called sensory receptors. There are different kinds of energy in the external world. Light is a form of electromagnetic energy. Sound and touch depend upon forms of mechanical energy, and taste and smell depend upon chemical energies. Sensory receptors are specialized to convert or transduce only one type of energy. Therefore, each of
  • 4. the sensory systems must have its own specialized sensory receptors. The job of the sensory receptors in each of the sensory systems is to transduce or convert some specific form of environmental energy into the brain's code, neuron potentials. In the visual system, the visual receptors, located at the back inner surface of the eyeball, the retina, are of two major types-- rods and cones. The auditory receptors, called "hair cells" and located in a structure called the cochlea in the inner ear, transduce mechanical energy in the form of vibrations in the air into neuron potentials. The touch receptors are located throughout the skin's surface all over the body and convert mechanical energy from pressure on the skin into neuron potentials. Temperature receptors in the skin convert heat or cold into neuron potentials. And pain receptors transduce any very intense and potentially injurious stimulus into neuron potentials. For the taste system, you can probably guess where the sensory receptors for this sensory system are located. It is the taste buds. The taste buds transduce chemical energies in chemicals dissolved in saliva into neuron potentials. The sensory organs, such as eyes and ears, are really accessory organs severing the sensory receptors. These organs contain the specialized nerve cells, the sensory receptors, whose function it is to convert the raw energies in the external world into a form the brain can handle. The eye for example just focuses light upon the visual receptors, the rods and cones in the retina at the back of the eyeball, wherein the actual transduction, the crucial step,
  • 5. occurs. The external ear just gathers vibrations in the air ("sound waves"). The structures of the inner ear magnify or amplify the mechanical energy in the vibrations in the air before it reaches the hair cells for transduction. To summarize, we have identified three general principles in the organization of sensory systems in animals and humans. The brain is completely insensitive to the external world in its raw forms. The brain can deal with information only if it is in the form of brain code, neuron potentials. Because of this, the first step in any sensory system is transduction, the conversion of some specific form of environmental energy into neuron potentials. Each of the sensory systems has its own sensory receptors "designed" to transduce one specific type of environmental energy (mechanical, chemical, or electromagnetic--light for example) into neuron potentials. But these first three principles only take us to the point where transduction has occurred in sensory receptors in sensory organs. This alone is insufficient for us to have sensory experience of the world. Could eyes not connected to the brain see anything? Or ears not connected to the brain hear anything? No. Seeing, hearing, touch and other skin sensations, tastes and smells occur in the brain. Somehow, after transduction, the resulting neuron potentials go to the brain and cause us to have psychological experiences, internal mental states, conscious sensations, which represent within our minds the external world, in the form of sights, sounds, smells, and skin sensations. How is this done? How do neuron potentials in our brains become mental experiences representing the external world to us? Several additional general principles of sensory systems are involved.
  • 6. After transduction of some specific form of environmental energy into neuron potentials, the resulting neuron potentials go from the specific sensory organ (i.e. eye or ear, for example) along specific sensory nerves (for example, the optic nerve in the case of vision, the auditory nerve in the case of hearing) to the brain, specifically to the Thalamus. In mammals such as us, each of the senses, except the sense of smell, has its own area of Thalamus, which receives neuron potentials from the respective sensory organ. For example, in the visual system, the part of the Thalamus that receives neuron potentials from the optic nerve is called the LGN, lateral geniculate nucleus. LGN is all you need to know. For the auditory system, it is the MGN, medial geniculate nucleus, that receives neuron potentials along the auditory nerve from the inner ear. As stated above, each of the senses, except the sense of smell, has its own specific area of thalamus. (Smell, the olfactory sense, has an anatomical organization different from the other senses and there is no area in the thalamus for the sense of smell.) Information, coded in the form of neuron potentials, from the various senses (except smell) is processed in these sensory-specific regions of the thalamus. After this processing in the thalamus, new neuron potentials generated there are sent on to the cerebral cortex for additional processing. In mammals, each area of thalamus (i.e. LGN, MGN, etc.) "projects", sends neural impulses (action potentials; see lecture and other materials on neuron potentials) to a specific area of cerebral cortex for more processing. The specific area of cortex that receives neural impulses from a specific region of the thalamus is called the primary sensory cortex for that sense. Each of the senses has its own primary sensory cortex. For example, the area of cerebral cortex that receives projections (nerve pathways carrying action potentials) from the LGN is the primary visual cortex (in the occipital lobe). The area of cortex that receives projections from the
  • 7. MGN of the thalamus is the primary auditory cortex (located in the temporal lobe). Interestingly, there is an orderly mapping of the sensory surface of each sense onto the surface of the respective primary sensory cortex. For example, the retina of the eye is mapped in an orderly way onto the surface of the primary visual cortex. For each point on the retina (the light sensitive surface at the back inner surface of each eyeball, containing the visual receptors--rods and cones), there is a corresponding point on the primary visual cortex in the Occipital lobe. Adjacent points on the retina have adjacent points on the surface of the primary visual cortex. This point- for-point mapping or representation of the retina (the visual receptive surface) onto the primary visual cortex is called a "retinotopic mapping." There is similar topographical mapping of the other sensory surfaces onto their respective primary sensory cortices. For example, the skin surface of the body is laid out, point-for-point, on the surface of the primary somatosensory cortex (located in the post-central gyrus of the Parietal lobe). However, this "somatotopic" mapping is upside down, but nevertheless orderly. In the auditory system, the auditory receptors ("hair cells") are distributed over a membrane, called the Basilar membrane, located inside the cochlea in the inner ear. The orderly distribution of these hair cells along the Basilar membrane is mapped in an orderly way onto the surface of primary auditory cortex in the Temporal lobe. These mappings of the sensory surfaces onto their respective primary sensory cortex probably is important in the coding of various features of sensory stimuli such as the location of objects and their parts in visual space, the locations of stimuli on the skin, and the frequencies of "sound" waves. After information processing in primary sensory cortex, additional information processing occurs in additional areas of cerebral cortex. These areas, in turn, are called secondary sensory cortex, third level (or tertiary) sensory cortex, fourth level sensory cortex, etc. For example, in the visual system, the
  • 8. primary visual cortex (also known as striate cortex or V1) is located in the central area of the Occipital lobe at the back of your head. Surrounding this area of cortex is secondary visual cortex (V2). In addition, there are visual areas 3, 4, 5 and 6 (V5, for example, processes information that allows you to see motion; in people with damage here, they can't see motion, but only a series of still views in successively different positions). In fact, it is estimated that in us, and in other primates, there may be over thirty different areas of cortex involved in the later stages of processing of visual information. One of these is the Inferotemporal (IT) Cortex, involved in our ability to recognize objects by sight alone. Damage there allows us to still see, but we can't recognize what it is we are seeing (this disorder is called visual agnosia). After these steps in information processing, somehow the resulting patterns of electrical activity occurring in large populations of neurons (which make up complex circuits in the brain) produce mental experiences of the external world. (Mental experiences may be so-called "emergent properties" of the structure and functioning of extremely complex circuits in the brain--entirely material in structure and function). These conscious, psychological experiences we have from the operation of our sensory systems are called "sensory qualia." For example, luminosity of light or colors of objects, both produced by neural activity in visual areas of the brain, are examples of visual qualia. Sounds, such as the sound of a cricket chirping, are auditory qualia. Tastes such as the taste of sugar or the taste of a lemon are taste qualia. There are also somatosensory qualia (skin sensations) and olfactory qualia (smells). Notice that all of the sensory qualia are produced when patterns of neural impulses reach and activate the neurons in a particular sensory cortex. Neural impulses are action potentials and they are the same everywhere. The thing that determines the nature of the sensory qualia, the type of sensory experience that one has from a particular sensory input, is
  • 9. where in the brain (which sensory cortex) the neural impulses, from the sensory organs, end up. So, for example, if we could somehow surgically redirect the optic nerves and connect them to taste cortex, then sensations of taste, taste qualia, would result when light was transduced by rods and cones in the eyes. In other words, under these conditions, you would taste light, not see it. If our nervous systems were in fact actually wired this way, you would grow up thinking that light was tasty (just like you think light is luminous and colored) and that different wavelengths of light had different tastes. And you would be right to say that light tasted, as right as you are when you say, now, that light is luminous and colored. Which is to say, you would be right, not at all. Light is neither tasty, nor luminous and colored. These different properties which we would ascribe to light are really properties of the activity of the neurons that get activated in the presence of light. These 8 general principles apply to all of our sensory systems and to the sensory systems of all the mammals. Furthermore, the first four also apply to the sensory systems of all animals in general. However, some non-mammal species don't have a thalamus, and no species, except mammal species, have cerebral cortex. In species without cortex or thalamus, other brain structures characteristic of those species carry out additional processing of sensory information. Nevertheless, transduction of environmental energies by sensory receptors into neuron potentials which are then processed by additional neural structures in the brain of the species is universal in all animals, even invertebrates such as jellyfish and insects. Forms of life which we might discover elsewhere in the universe someday (alien life forms) may be expected to follow a similar organization. An extremely interesting and important thing to understand is that:
  • 10. Sensory qualia are entirely in your head (more accurately, in your brain). Although we grow up thinking that light is luminous and colored, in fact it is not. Light in fact is no more luminous or colored than X-rays or radio waves (both of which, like light, are forms of electromagnetic energy). Luminosity (the glowing quality that we attribute to light) and color are really properties of the brain's response to light, not properties of light itself. Light, in the external world, is really just as dark as other forms of electromagnetic energy (the forms of electromagnetic energy are gamma rays, X-rays, ultraviolet, visible light, infrared, T.V. , radio, in order of increasing wavelength). The luminosity we associate with light is not in the light, but results from brain activity in the visual system of our brains. Luminosity and color are not in the world at all, but are creations of our brains' visual cortical neurons. Here is a simple demonstration of this surprising fact that you can do at home (but be careful not to hurt yourself). Here's what to do. At night, go into your room, shut off the lights, then go into your closet, close the door behind you, making sure the closet light (if any) is off. Now, when you are sure that there is absolutely no light at all reaching your eyes, whack yourself hard on the back of your head. What happens? Well, you should "see stars." These "stars" have a technical name; they are called "phosphemes," sensations of luminosity and color. But look what has happened. You are experiencing visual qualia (luminosity and colors) in the complete absence of light. These visual qualia are produced by the whack to the back of your head, which activates neurons in the primary visual cortex. It is the activation of those cells that produces luminosity and color, even in the total absence of light. Somehow activation of those visual cortical neurons by any means will produce in the mind the visual qualia, luminosity and color. With this simple demonstration, you have verified an astounding fact--luminosity
  • 11. and color are not properties of light, but are properties of the activation of visual cortical neurons. Under normal conditions, light (remember, just a form of electromagnetic energy) from the external world strikes the eyes and is transduced by rods and cones into neuron potentials. Those neuron potentials are transmitted along the optic nerve to the LGN of the thalamus, and from there on to the visual cortex. The activation of neurons in the visual cortex by neuron potentials from the LGN causes the visual qualia, luminosity and color. Luminosity and color don't exist in the external world at all, and are not really properties of light at all, but instead are properties of the activation of visual cortical neurons in the brain. Thus, luminosity and color exist only inside brains, not in the external world, not in light itself. I know this may be hard to accept, but there is other more scientific evidence, primarily from studies on the effects of brain damage and brain stimulation in conscious patients during brain surgery. Electrical stimulation of the cortex in conscious human patients during brain surgery causes different sensory qualia, different sensory experiences, depending upon the area of sensory cortex stimulated. Electrical stimulation of the visual cortex by the neurosurgeon causes the patient to report "seeing" visual qualia such as flashes of luminosity and color. Electrical stimulation of the auditory cortex produces auditory qualia, sounds. Electrical stimulation of the taste cortex produces mental experiences of taste, taste qualia. Electrical stimulation of the olfactory cortex produces olfactory sensations or qualia, smells. All of these realistic sensory qualia can be produced in the total absence of any of the corresponding external stimuli. That is, in the absence of any light, or sound sources, or smelly or tasty objects in the external world, realistic sensory experiences can be produced by stimulation of sensory cortex. So, if the sensory qualia can be produced in someone's mind just by stimulating
  • 12. neurons in one sensory cortex or another, even in the absence of any sensory stimuli in the external world, then those qualia must be properties of brain activity, not properties of the external world. Similar conclusions can be drawn from observing the effects of injury to sensory cortex. For example, damage to the primary visual cortex causes blindness (called "cortical blindness"). Even though the eyes are still working normally, and there may be plenty of light to illuminate objects in the person's field of view, someone with total destruction of primary visual cortex is completely blind--there is only darkness for the person with total destruction of primary visual cortex; there are no longer any visual qualia at all. Total destruction of the primary sensory cortex of other senses produces similar loss of particular sensory qualia. With regard to color sensations similar arguments can be made. The experience of different colors is really a brain code for different wavelengths of light. (Light travels in waves through space; the distance between adjacent wave peaks is the wavelength of the light; the wavelength of light reflected from an object depends upon the chemical composition and other physical properties of the material out of which an object is composed). Within our eyes we have rods and cones (the visual receptors). There are three different types of cones (but just one type of rod). Each type of cone is maximally sensitive (maximally able to transduce) light waves within its own particular range of wavelengths. "Color vision" begins when a particular wavelength of reflected light gets transduced by a particular set of cones. These, in turn, send a particular pattern of neural impulses to specific neurons in the visual cortex (via the LGN of the thalamus), which when stimulated produce the mental experience of a particular color. None of this occurs in the brain of a dog or a cow or many other
  • 13. species which lack cones in their eyes (they have rods only). Is our perception of reality more complete or more accurate than that of the dog which lacks color vision? In one sense, the answer is yes--we have the capacity to code the wavelength of reflected light in the external world, the dog does not. But, nevertheless, the "color" we experience in our minds only exists there, not in the external world. So, in a way, we are somewhat misled by our color perception. There are different wavelengths of light, and it is adaptive for us to possess a mental code for these different wavelengths. (It makes it very easy to see ripened fruit against the leafy background of a tree, a real advantage to our tree-living primate ancestors who also had good "color" vision). But, the color in our minds is an illusion. The light in the external world is not really colored, in fact, it is not even luminous (it is as dark and non-luminous as X-rays or radio waves). The luminosity of light, as we experience it, is dependent upon the fact that light (a particular range of wavelengths within the electromagnetic spectrum) gets transduced by rods and cones leading to activation of visual cortical neurons in our heads. If rods and cones were constructed differently, so that they transduced a different range of wavelengths within the electromagnetic spectrum, say, for example, that range known as radio waves, then we would experience radio waves as being luminous, and different wavelengths of radio waves as different colors. Regarding color specifically, here is something you can demonstrate to yourself that will show that the visual qualia, color, exists only inside brains. Imagine being outside around sunset. You will notice that objects in the environment still appear to have color. Trees still appear green. Their trunks still appear some shade of brown. You may see a red car parked nearby, and someone walks past you in blue jeans. But as the sun sets, and the daylight fades more and more, there comes a point at which the trees no longer
  • 14. are green, other objects "lose" their colors, and all becomes blacks and shades of gray, if there are no artificial sources of light, as would be the case in the desert or mountains away from city lights. It is about 9 p.m. as I write this. A moment ago, I stepped outside. I saw a large tree. The shape of the tree including some of its leaves was clearly visible, but the tree was completely black and gray. There was no color at all. Now, think about this. Where did the color go? The answer is, it really wasn't there to begin with. What has happened, as the intensity of light drops off, is that color-generating systems in the brain and nervous system shut down. When the color- generating systems in the brain and nervous system shut down, the color disappears because the color was only in your head (your brain) in the first place, never really in the external world at all. It is known that the visual receptors that are involved in color perception, the cones, can only transduce the higher levels of light typical of daylight. At night, there is insufficient light to cause transduction in the cones, but still enough for transduction by the rods. Cones activate parts of the visual system, at the level of the LGN and visual cortex, which generate color qualia, sensations of color. Without the activation of these brain systems, there is no color. You experience this absence of color firsthand at night (if there are no artificial light sources to raise levels of light to the threshold necessary to activate the cones and their associated color generating circuits in the brain). Color, like luminosity, or sound, or tastes and smells or sensations on the skin, exist only inside living, functioning brains. During brain surgery, patients who have their primary somatosensory cortex stimulated report feeling things at various places on their skin. In one case which I witnessed (via a film of the surgery), the patient said with astonishment, when a point
  • 15. on his somatosensory cortex was stimulated, "I feel something on my teeth." When a nearby point on the same cortex was stimulated a moment later, he said with equal astonishment, "Now, it's on my tongue. I feel something on my tongue!" There was nothing on his teeth or on his tongue. The realistic feeling of something on the teeth or tongue was due to electrical stimulation of different, but nearby, regions of primary somatosensory cortex. The lesson of these examples is that the world that we know and experience is really in our heads (more accurately, in our brain function). The color, the luminosity, the tastes, the smells and other sensory qualia are not properties of the external world or the things in it, but properties produced by the activity of nerve cells organized into complex circuits in the brain. By these arguments, I'm not denying that there is an external world out there, outside our heads, I'm just saying that it doesn't really look, sound, smell, feel, or taste the way we think it does. In the objective world outside our heads, none of these subjective properties actually exist. So what does the world outside our heads really look like? It doesn't really look like anything, independent of the properties of the "looker", the brain and nervous system that is doing the looking. What the world or anything else looks like is dependent as much upon the properties of the nervous system doing the looking as it is upon properties of the things being looked at. The world looks one way to a bee, another way to a snake, another way to a dog, another way to a bat, another way still to us. In each case, the nervous system creates a representation, a model, of the external world, the function of which is guide adaptive behavior of the organism. Natural selection "designed" nervous systems for that adaptive "purpose", not to give the organism an objective model of absolute Reality with a capital R. Reality is species-specific. Each species' nervous system represents the aspects of the world important for the organization of successful
  • 16. behavioral adaptation for that species, within the environmental niche occupied by that species. However, in spite of species differences in sensory systems and resulting differences in the representation of reality for each species, there are also likely to be aspects of the external world that are represented in similar ways across a broad range of species. These aspects of reality would be those which are more or less universal to the environmental niches of a broad range of species. For example, representation by the brain of gravitational forces and their direction is something that is probably universally found in a very broad range of species of animal life on earth. This is pretty abstract and somewhat speculative stuff. Let's make it a bit more concrete. Let's consider the classic philosophical question: "If a tree falls in the forest, and there is no one [no brain] to hear it, is there a sound?" Go to the main topic in this conference with the appropriate title to respond to this question. YOUR TASK: Here, just tell me and your classmates that you have read this lecture, and then briefly describe two ideas or facts that you found most interesting or important and in addition, post any questions or comments about the lecture that you may have. Word doc and .java/BST.javaWord doc and .java/BST.java // Liang - Introduction to Java Programming, 9th Edition (Code Examples of Chapter 27 Binary Search Trees) // Source code of the examples available at: // http://www.cs.armstrong.edu/liang/intro9e/examplesource.htm l
  • 17. publicclass BST<E extendsComparable<E>>{ protectedTreeNode<E> root; protectedint size =0; /** Create a default binary tree */ public BST(){ } /** Create a binary tree from an array of objects */ public BST(E[] objects){ for(int i =0; i < objects.length; i++) insert(objects[i]); } /** Returns true if the element is in the tree */ publicboolean search(E e){ TreeNode<E> current = root;// Start from the root while(current !=null){ if(e.compareTo(current.element)<0){ current = current.left; } elseif(e.compareTo(current.element)>0){ current = current.right; } else// element matches current.element returntrue;// Element is found } returnfalse; } /** Insert element o into the binary tree * Return true if the element is inserted successfully */
  • 18. publicboolean insert(E e){ if(root ==null) root = createNewNode(e);// Create a new root else{ // Locate the parent node TreeNode<E> parent =null; TreeNode<E> current = root; while(current !=null) if(e.compareTo(current.element)<0){ parent = current; current = current.left; } elseif(e.compareTo(current.element)>0){ parent = current; current = current.right; } else returnfalse;// Duplicate node not inserted // Create the new node and attach it to the parent node if(e.compareTo(parent.element)<0) parent.left = createNewNode(e); else parent.right = createNewNode(e); } size++; returntrue;// Element inserted } protectedTreeNode<E> createNewNode(E e){ returnnewTreeNode<E>(e); } /** Inorder traversal from the root*/ publicvoid inorder(){
  • 19. inorder(root); } /** Inorder traversal from a subtree */ protectedvoid inorder(TreeNode<E> root){ if(root ==null)return; inorder(root.left); System.out.print(root.element +" "); inorder(root.right); } /** Postorder traversal from the root */ publicvoid postorder(){ postorder(root); } /** Postorder traversal from a subtree */ protectedvoid postorder(TreeNode<E> root){ if(root ==null)return; postorder(root.left); postorder(root.right); System.out.print(root.element +" "); } /** Preorder traversal from the root */ publicvoid preorder(){ preorder(root); } /** Preorder traversal from a subtree */ protectedvoid preorder(TreeNode<E> root){ if(root ==null)return; System.out.print(root.element +" "); preorder(root.left); preorder(root.right); }
  • 20. /** This inner class is static, because it does not access any instance members defined in its outer class */ publicstaticclassTreeNode<E extendsComparable<E>>{ protected E element; protectedTreeNode<E> left; protectedTreeNode<E> right; publicTreeNode(E e){ element = e; } } /** Get the number of nodes in the tree */ publicint getSize(){ return size; } /** Returns the root of the tree */ publicTreeNode<E> getRoot(){ return root; } /** Returns a path from the root leading to the specified elemen t */ public java.util.ArrayList<TreeNode<E>> path(E e){ java.util.ArrayList<TreeNode<E>> list = new java.util.ArrayList<TreeNode<E>>(); TreeNode<E> current = root;// Start from the root while(current !=null){ list.add(current);// Add the node to the list if(e.compareTo(current.element)<0){ current = current.left; } elseif(e.compareTo(current.element)>0){
  • 21. current = current.right; } else break; } return list;// Return an array of nodes } /** Delete an element from the binary tree. * Return true if the element is deleted successfully * Return false if the element is not in the tree */ publicboolean delete(E e){ // Locate the node to be deleted and also locate its parent node TreeNode<E> parent =null; TreeNode<E> current = root; while(current !=null){ if(e.compareTo(current.element)<0){ parent = current; current = current.left; } elseif(e.compareTo(current.element)>0){ parent = current; current = current.right; } else break;// Element is in the tree pointed at by current } if(current ==null) returnfalse;// Element is not in the tree // Case 1: current has no left children if(current.left ==null){ // Connect the parent with the right child of the current node if(parent ==null){
  • 22. root = current.right; } else{ if(e.compareTo(parent.element)<0) parent.left = current.right; else parent.right = current.right; } } else{ // Case 2: The current node has a left child // Locate the rightmost node in the left subtree of // the current node and also its parent TreeNode<E> parentOfRightMost = current; TreeNode<E> rightMost = current.left; while(rightMost.right !=null){ parentOfRightMost = rightMost; rightMost = rightMost.right;// Keep going to the right } // Replace the element in current by the element in rightMost current.element = rightMost.element; // Eliminate rightmost node if(parentOfRightMost.right == rightMost) parentOfRightMost.right = rightMost.left; else // Special case: parentOfRightMost == current parentOfRightMost.left = rightMost.left; } size--; returntrue;// Element inserted }
  • 23. /** Obtain an iterator. Use inorder. */ public java.util.Iterator<E> iterator(){ returnnewInorderIterator(); } // Inner class InorderIterator privateclassInorderIteratorimplements java.util.Iterator<E>{ // Store the elements in a list private java.util.ArrayList<E> list = new java.util.ArrayList<E>(); privateint current =0;// Point to the current element in list publicInorderIterator(){ inorder();// Traverse binary tree and store elements in list } /** Inorder traversal from the root*/ privatevoid inorder(){ inorder(root); } /** Inorder traversal from a subtree */ privatevoid inorder(TreeNode<E> root){ if(root ==null)return; inorder(root.left); list.add(root.element); inorder(root.right); } /** More elements for traversing? */ publicboolean hasNext(){ if(current < list.size()) returntrue; returnfalse; }
  • 24. /** Get the current element and move to the next */ public E next(){ return list.get(current++); } /** Remove the current element */ publicvoid remove(){ delete(list.get(current));// Delete the current element list.clear();// Clear the list inorder();// Rebuild the list } } /** Remove all elements from the tree */ publicvoid clear(){ root =null; size =0; } } Word doc and .java/homework 9JUN2016.docx Balancing Binary Search Trees 1. Specification The search effort for locating a node in a Binary Search Tree (BST) depends on the tree shape (topology). For a BST with n nodes the ACE value is defined (Wiener and Pinson) as the Average Comparison Effort for locating a node in a tree by summing all comparison operations for all tree nodes and dividing the result by the total number of tree nodes: for (int level = 0, sum = 0; level < treeHeight; level++ ) { sum += numberOfNodesAtLevel(level) * (level + 1) } ACE = sum / n When the average comparison effort (i.e. the ACE value) gets
  • 25. over a certain threshold or after a certain number of tree insert/delete operations, for optimizing the search process, a tree balance operation should be executed resulting a tree whose height equals |_ log n _| + 1 (or floor(log n) + 1), thus requiring at most |_ log n _| + 1 (or floor(log n) + 1) comparison operations to identify any tree node. For a given BST with n nodes we define MinACE as the minimum value of ACE and MaxACE as the maximum value of ACE. MinACE value for a BST with n nodes, corresponds to the ACE value calculated for a BST of height floor(log n) + 1 which has all levels completely full, except for the last level. The ACE value of a balanced BST equals MinACE. MaxACE value for a BST with n nodes corresponds to the ACE value calculated for a BST which degenerates into a linear linked list with n nodes. Part 1 Consider the attached file BST.java which defines a generic BST class. Enhance the BST class with the following methods: · treeHeight, calculates tree height; · nodeBalanceLevel calculates the balance level of a user specified node as the difference between the height of its left subtree and the height of its right subtree; · numberOfNodesAtLevel calculates the number of nodes at the specified level; · calculateACE, calculates the ACE value according to the above algorithm; · calculateMinACE, calculates the minimum value of the ACE; · calculateMaxACE, calculates the maximum value of the ACE; · needsBalancing, evaluates whether this BST needs to be balanced or not. We consider that a BST needs to be balanced when its ACE value is greater than K * MinACE where K =
  • 26. 1.28; · doBalanceBST, executes the balance operation on this BST; Additional methods may be added if necessary. The enhanced BST class should compile without errors. Part 2 Design and implement a driver program TestBST for testing the methods implemented in Part 1. The driver program should build an initial BST whose nodes contain positive integer values taken from an input file. In the input file, the values should be separated by the semicolon character. After building the BST, in a loop, the program should invite the user to select for execution one of the following operations: (1) in-order tree traversal, (2) pre-order tree traversal, (3) calculateACE, (4) calculateMinACE, (5) calculateMaxACE, (6) numberOfNodesAtLevel, (7) treeHeight, (8) nodeBalanceLevel (9) needsBalancing, (10) doBalanceBST, (11) insert value, and (0) exit the loop and the program. As a result of each operation execution, relevant information will be displayed to the user. For example, as a result of executing the in-order traversal, the values of the tree nodes should be shown to the console or, as a result of executing the calculateACE operation, the ACE value should be displayed to the console. Notes. 1. If an operation requires additional information, the user will be prompted to enter it. 2. The input file (a simple .txt file) should be generated by the students using a simple text editor such as Notepad. 3. You may assume that there are no errors in the input file structure. 4. Tree root is considered as located at level 0. Tree height will be calculated by counting the nodes, starting with the root, along the longest path. 2. Submission requirements
  • 27. Submit the following before the due date listed in the Calendar: 1. All .java source files and the input file. The source code should use Java code conventions and appropriate code layout (white space management and indents) and comments. 2. The solution description document <YourSecondName>_P2 (.pdf or .doc / .docx) containing: (2.1) assumptions, main design decisions, error handling; (2.2) test cases and two relevant screenshots; (2.3) lessons learned and (2.4) possible improvements. The size of the document file (including the screenshots) should be of 3 pages, single spaced, font size 10 Grading requirements: Design (20 points): Employs Modularity (including proper use of parameters, use of local variables etc.) most of the time Employs correct & appropriate use of programming structures (loops, conditionals, classes etc.) most of the time Efficient algorithms used most of the time Excellent use of object-oriented design Functionality (20 points): Program fulfills all functionality All requirements were fulfilled Extra effort was apparent Test Plan (20 points): Comprehensive test plan. Documentation (20 points): Excellent comments Comprehensive lessons learned Excellent possible improvements included Excellent approach discussion and references