Please contribute by sending lecture notes to pnt_jjd@hotmail.com. You can help improve existing posts by commenting. Your name will be mentioned in the post.

MICR

November 13, 2010 1 comment

Contributed by:Shubham Jhandei—–> 2K9 batch

Click here to download pdf

Advertisements
Categories: I/O devices

Magnetic drums

November 12, 2010 Leave a comment

Contributor:Nishant Chauhan—> 2k9 batch

Click here to download pdf

Categories: I/O devices, PMFS

C programs for implementation of stack, queue and linked lists

November 12, 2010 Leave a comment

FOR STACK

#include<stdio.h>
#define MAX_SIZE 20
void push(int a);
int pop();
void show();

int stack[MAX_SIZE];
int top=-1;
main()
{
int i,x;
printf(“1 for push 2 for pop and 3for exit”);
scanf(“%d”,&i);
switch(i)
{
case 1:
printf(“enter the element”);
scanf(“%d”,&x);
push(x);
show();
main();
break;
case 2:
x=pop();
printf(“element is %d\n”,x);
show();
main();
break;
case 3:
show();
}
system(“pause”);
}

void push(int x)
{
if(top==19){
printf(“full”);
exit(1);}
stack[++top]=x;
}

int pop()
{

if(top==-1){
printf(“empty”);
exit(1);
}
return(stack[top–]);
}

void show()
{
int b;
b=top;
while(b>=0)
printf(“%d\n”,stack[b–]);
}

FOR QUEUE

#include<stdio.h>

void enqueue(int x);
int dequeue();
void show();
int queue[5];
int front=0,rear=0;
main()
{
int i;
int x;
printf(“enter 1 for enter 2 for remove 3 for exit”);
scanf(“%d”,&i);
switch(i)
{
case 1:
printf(“\nEnter the element to enter”);
scanf(“%d”,&x);
enqueue(x);
show();
main();
break;
case 2:
x=dequeue();
printf(“\nThe item removed is %d\n”,x);
show();
main();
case 3:
show();

}
system(“pause”);
}
void enqueue(int x)
{

rear=(rear+1)%5;
if(rear==front){
printf(“\nFull”);
rear=(rear+4)%5;
main();
}
queue[rear]=x;
}

int dequeue()
{
if(front==rear)
{
printf(“\nEmpty…put elements first”);
main();
}
front=(front+1)%5;
return queue[front];
}

void show()
{
int r;
r=front;
printf(“The elements of the queue are\n”);
while(r!=rear)
{
printf(“%d\t”,queue[r+1]);
r++;
}
}

FOR LINKED LISTS

//Linked lists
#include<stdio.h>
typedef struct student node;
struct student
{
int key;
node *next;
};

void enter(node *s);
void print(node *p);

main()
{
node *p;
printf(“enter the list”);
p=(node *)malloc(sizeof(node));
enter(p);
printf(“\n\nthe list is\n”);
print(p);
printf(“\n”);
system(“pause”);

}

void enter(node* p)
{
char c;
printf(“\nenter the key:”);
scanf(“%d”,&p->key);
printf(“want to enter a new entry press y:”);
c=getch();
if(c==’y’ || c==’Y’)
{
p->next=(node *)malloc(sizeof(node));
enter(p->next);
}
else
{
p->next=NULL;

}
return;

}

void print(node *p)
{
if(p)
{
printf(“%d\n”,p->key);
print(p->next);
}

}

FOR CIRCULAR LINKED LISTS

//Circular Linked lists
#include<stdio.h>
typedef struct student node;
struct student
{
int key;
node *next;
};

node* enter(node *s);
void print(node *p);

main()
{
node *p,*q;
printf(“enter the list”);
p=(node *)malloc(sizeof(node));
q=enter(p);
q->next=p;
printf(“\n\nthe list is\n”);
print(p);
printf(“\n”);
system(“pause”);

}

node* enter(node* p)
{
char c;
enternode: printf(“\nenter the key:”);
scanf(“%d”,&p->key);
printf(“want to enter a new entry press y:”);
c=getch();
if(c==’y’ || c==’Y’)
{
p->next=(node *)malloc(sizeof(node));
p=p->next;
goto enternode;
}
else
{
return(p);

}
return;

}

void print(node *p)
{
node *q;
q=p;
do
{
if(p)
{
printf(“%d\n”,p->key);
p=p->next;
}
}while(p!=q);
}

#include<stdio.h>

void enqueue(int x);
int dequeue();
void show();
int queue[5];
int front=0,rear=0;
main()
{
int i;
int x;
printf(“enter 1 for enter 2 for remove 3 for exit”);
scanf(“%d”,&i);
switch(i)
{
case 1:
printf(“\nEnter the element to enter”);
scanf(“%d”,&x);
enqueue(x);
show();
main();
break;
case 2:
x=dequeue();
printf(“\nThe item removed is %d\n”,x);
show();
main();
case 3:
show();

}
system(“pause”);
}
void enqueue(int x)
{

rear=(rear+1)%5;
if(rear==front){
printf(“\nFull”);
rear=(rear+4)%5;
main();
}
queue[rear]=x;
}

int dequeue()
{
if(front==rear)
{
printf(“\nEmpty…put elements first”);
main();
}
front=(front+1)%5;
return queue[front];
}

void show()
{
int r;
r=front;
printf(“The elements of the queue are\n”);
while(r!=rear)
{
printf(“%d\t”,queue[r+1]);
r++;
}
}

Categories: Data Structures

queue(for concept only)

November 12, 2010 Leave a comment
  1. Abstract idea of a queue:The queue is another data structure. A physical analogy for a queue is a line at a bank. When you go to the bank, customers go to the rear (end) of the line and customers come off of the line (i.e., are serviced) from the front of the line.

     


    Aside: In fact, other English-speaking countries use this term for a line, e.g., they might say “Queue up!” rather than “Get in a line!”


    Like a stack, a queue usually holds things of the same type. We usually draw queues horizontally. Here’s a queue of characters with 3 elements:

    queue
    -------------
    | a | b | c |
    -------------
      ^       ^
      |       |
    front    rear
    

    The main property of a queue is that objects go on the rear and come off of the front of the queue.

    Here are the minimal set of operations we’d need for an abstract queue:

     

    • Enter (or Insert)Places an object at the rear of the queue.

       

    • Delete (or Remove)Removes an object from the front of the queue and produces that object.

       

    • IsEmptyReports whether the queue is empty or not.

     

  2. Order produced by a queue: 

    Queues are useful because they produce a certain order in which the contents of the queue are used. Let’s see what order that is by looking at a queue of characters. Now, what would a particular sequence of Enter and Deletes do to this queue:

    queue
    -------------
    | a | b | c |
    -------------
      ^       ^
      |       |
    front    rear
    

    Now, Enter(queue, 'd')

    queue
    -----------------
    | a | b | c | d |
    -----------------
      ^           ^
      |           |
    front        rear
    

    Now, ch = Delete(queue)

    queue           ch
    -------------   -----
    | b | c | d |   | a |
    -------------   -----
      ^       ^
      |       |
    front    rear
    

    You’ll notice that the queue enforces a certain order to the use of its contents. Is the ordering of the queue Last thing In is the First thing Out (LIFO) or First Thing In is the First thing Out (FIFO)?

    Answer: Queues produce FIFO order. Remember that stacks produce LIFO order.

     

  3. Implementing a queue with an array:Since a queue usually holds a bunch of items with the same type, we could implement a queue with an array. Let’s simplify our array implementation of a queue by using an array of a fixed size, MAX_QUEUE_SIZE.

    What other pieces of data would you need (besides an array) to implement a queue in this way?

    One of the things we’ll need to keep track of is the number of elements in the queue, i.e., not all the elements in the array may be holding elements of the queue at any given time.

    So far, the pieces of data we need for our array implementation of the queue are:

    an array
    a count
    

    Will these pieces be sufficient? Let’s look at an example to find out…We’ll start with a queue with 3 elements:

    queue (made up of 'contents' and 'count')
    -----------------   -----
    | a | b | c |   |   | 3 |
    -----------------   -----
      0   1   2   3     count
    contents
    

    where a is at the front and c is at the rear. Now, we enter a new element with: Enter(queue, 'd')

    queue (made up of 'contents' and 'count')
    -----------------   -----
    | a | b | c | d |   | 4 |
    -----------------   -----
      0   1   2   3     count
    contents
    

    All seems well. How about if we remove an element with: ch = Delete(queue)?…

    queue (made up of 'contents' and 'count')
    -----------------   -----   -----
    |   | b | c | d |   | 3 |   | a |
    -----------------   -----   -----
      0   1   2   3     count    ch
    contents
    

    Hmmm, we have a problem because the front of the queue is no longer at array position 0. One solution would be to move all the elements down one, giving:

    queue (made up of 'contents' and 'count')
    -----------------   -----
    | b | c | d |   |   | 3 |
    -----------------   -----
      0   1   2   3     count
    contents
    

    We reject that solution though because it is too expensive to move everything down every time we remove an element.

    Instead, can we use an additional piece of information to keep track of the front?

    Answer: Yes! We can use the index of the element at the front, giving:

    queue (made up of 'contents', 'front' and 'count')
    -----------------   -----   -----
    |   | b | c | d |   | 1 |   | 3 |
    -----------------   -----   -----
      0   1   2   3     front   count
    contents
    

    Now, what if we enter another element with: Enter(queue, 'e')? Currently, the rear of the queue holds 'd' and is at the end of the array. Where will we put 'e'?

    We’ve already said that moving everything down is too expensive. An alternative would be to use the array in a circular fashion. In other words, when we hit the end of the array, we wrap around and use the beginning. Now, with this choice for entering 'e', the fields look like:

    queue (made up of 'contents', 'front' and 'count')
    -----------------   -----   -----
    | e | b | c | d |   | 1 |   | 4 |
    -----------------   -----   -----
      0   1   2   3     front   count
    contents
    

    Finally, how would it look like after: ch = Delete(queue)?

    queue (made up of 'contents', 'front' and 'count')
    -----------------   -----   -----   -----
    | e |   | c | d |   | 2 |   | 3 |   | b |
    -----------------   -----   -----   -----
      0   1   2   3     front   count    ch
    contents
    

     

  4. Alternative representation:As we’ve seen, one choice for the set of data needed for the queue is:
    an array
    a front index
    a count
    

    There is another possibility…Instead, we could replace the count with the location of the rear, thus using the following pieces of data:

    an array
    a front index
    a rear index
    

    Then, these pieces of data would reflect the state of the queue in the following way…Starting out with a queue with 4 elements…

    queue (made up of 'contents', 'front' and 'rear')
    -----------------   -----   -----
    | a | b | c | d |   | 0 |   | 3 |
    -----------------   -----   -----
      0   1   2   3     front   rear
    contents
    

    Now, remove one with ch = Delete(queue), giving:

    queue (made up of 'contents', 'front' and 'rear')
    -----------------   -----   -----
    |   | b | c | d |   | 1 |   | 3 |
    -----------------   -----   -----
      0   1   2   3     front   rear
    contents
    

    Now, add one with Enter(queue, 'e'), giving:

    queue (made up of 'contents', 'front' and 'rear')
    -----------------   -----   -----
    | e | b | c | d |   | 1 |   | 0 |
    -----------------   -----   -----
      0   1   2   3     front   rear
    contents
    

    Let’s decide which data representation to use. Since one representation might make some of the queue functionality conceptually easier to write, we have to look at the functionality we’ll need.

    From the generic description of the queue, we know we need, at least:

    • Enter
    • Delete
    • IsEmpty

    However, since we will be writing this is C, we’ll also need things to:

     

    • Create – create a new queue.
    • Destroy – destroy the queue when we are done with it.
    • IsFull – test for fullness since this is a queue with a fixed maximum size.

    Our analysis of the tradeoffs are the following:

     

    • Using the count will make IsEmpty() and IsFull() easy, although we’ll have to make sure the count is updated properly in Enter() and Delete(). We haven’t explored how to determine emptiness/fullness with rear or whether doing so presents any challenges. 
    • Using the count in Enter() is similar to using rear. In both cases, the front won’t move. With the count, we’ll have to use count to calculate at which position to add new values, making sure to wrap around the array if necessary. Similarly, with a rear we have to make sure the rear moves properly and wraps around. 
    • Using the count in Delete() is not more difficult than using rear. In both cases, the front has to move (and wrap around when necessary).

    Given these differences, we’ll choose the representation with a count.

     

  5. C implementation:Now, think about how to actually implement this queue in C. Again, we’re implementing a queue of characters.

    Since we put data structures in their own modules, we’ll want to create the source files queue.h and queue.c.

    The operations needed for our queue are mainly determined by the operations provided by an abstract queue, namely:

    QueueEnter()
    QueueDelete()
    QueueIsEmpty()
    

    However, as we’ve seen, we also need additional operations for setup and cleanup since we are implementing the queue in a programming language. In addition, we need to be able to test fullness for this finite queue. We’ll introduce these extra operations when we know more about how we will implement the queue.

Categories: Data Structures

Stack(for concept only only)

November 12, 2010 Leave a comment
  1. Abstraction

    Now, let’s think about a stack in an abstract way. I.e., it doesn’t hold any particular kind of thing (like books) and we aren’t restricting ourselves to any particular programming language or any particular implementation of a stack.

    Stacks hold objects, usually all of the same type. Most stacks support just the simple set of operations we introduced above; and thus, the main property of a stack is that objects go on and come off of the top of the stack.

    Here are the minimal operations we’d need for an abstract stack (and their typical names):

     

    • Push: Places an object on the top of the stack. 
    • Pop: Removes an object from the top of the stack and produces that object. 
    • IsEmpty: Reports whether the stack is empty or not.

    Because we think of stacks in terms of the physical analogy, we usually draw them vertically (so the top is really on top).

     

  2. Order produced by a stack: 

    Stacks are linear data structures. This means that their contexts are stored in what looks like a line (although vertically). This linear property, however, is not sufficient to discriminate a stack from other linear data structures. For example, an array is a sort of linear data structure. However, you can access any element in an array–not true for a stack, since you can only deal with the element at its top.

    One of the distinguishing characteristics of a stack, and the thing that makes it useful, is the order in which elements come out of a stack. Let’s see what order that is by looking at a stack of letters…

    Suppose we have a stack that can hold letters, call it stack. What would a particular sequence of Push and Pops do to this stack?

    We begin with stack empty:

    -----
    stack
    

    Now, let’s perform Push(stack, A), giving:

    -----
    | A |  <-- top
    -----
    stack
    

    Again, another push operation, Push(stack, B), giving:

    -----
    | B |  <-- top
    -----
    | A |
    -----
    stack
    

    Now let’s remove an item, letter = Pop(stack), giving:

    -----              -----
    | A |  <-- top     | B |
    -----              -----
    stack              letter
    

    And finally, one more addition, Push(stack, C), giving:

    -----
    | C |  <-- top
    -----
    | A |
    -----
    stack
    

    You’ll notice that the stack enforces a certain order to the use of its contents, i.e., the Last thing In is the First thing Out. Thus, we say that a stack enforces LIFO order.

    Now we can see one of the uses of a stack…To reverse the order of a set of objects.

     

  3. Implementing a stack with an array:Let’s think about how to implement this stack in the C programming language.

    First, if we want to store letters, we can use type char. Next, since a stack usually holds a bunch of items with the same type (e.g., char), we can use an array to hold the contents of the stack.

    Now, consider how we’ll use this array of characters, call it contents, to hold the contents of the stack. At some point we’ll have to decide how big this array is; keep in mind that a normal array has a fixed size.

    Let’s choose the array to be of size 4 for now. So, an array getting A, then B, will look like:

    -----------------
    | A | B |   |   |
    -----------------
      0   1   2   3
    contents
    

    Is this array sufficient, or will we need to store more information concerning the stack?

    Answer: We need to keep track of the top of the stack since not all of the array holds stack elements.

    What type of thing will we use to keep track of the top of the stack?

    Answer: One choice is to use an integer, top, which will hold the array index of the element at the top of the stack.

    Example:

    Again suppose the stack has (A,B) in it already…

    stack (made up of 'contents' and 'top')
    -----------------   -----
    | A | B |   |   |   | 1 |
    -----------------   -----
      0   1   2   3      top
    contents
    

    Since B is at the top of the stack, the value top stores the index of B in the array (i.e., 1).

    Now, suppose we push something on the stack, Push(stack, 'C'), giving:

    stack (made up of 'contents' and 'top')
    -----------------   -----
    | A | B | C |   |   | 2 |
    -----------------   -----
      0   1   2   3      top
    contents
    

    (Note that both the contents and top part have to change.)So, a sequence of pops produce the following effects:

     

    1. letter = Pop(stack)
      stack (made up of 'contents' and 'top')
      -----------------   -----    -----
      | A | B |   |   |   | 1 |    | C |
      -----------------   -----    -----
        0   1   2   3      top     letter
      contents
      
    2. letter = Pop(stack)
      stack (made up of 'contents' and 'top')
      -----------------   -----    -----
      | A |   |   |   |   | 0 |    | B |
      -----------------   -----    -----
        0   1   2   3      top     letter
      contents
      
    3. letter = Pop(stack)
      stack (made up of 'contents' and 'top')
      -----------------   -----    -----
      |   |   |   |   |   | -1|    | A |
      -----------------   -----    -----
        0   1   2   3      top     letter
      contents
      

    so that you can see what value top should have when it is empty, i.e., -1.

    Let’s use this implementation of the stack with contents and top fields.

     


    What happens if we apply the following set of operations? 

    1. Push(stack, 'D')
    2. Push(stack, 'E')
    3. Push(stack, 'F')
    4. Push(stack, 'G')

    giving:

    stack (made up of 'contents' and 'top')
    -----------------   -----
    | D | E | F | G |   | 3 |
    -----------------   -----
      0   1   2   3      top
    contents
    

    and then try to add H with Push(stack, 'H')?

    Thus, what is the disadvantage of using an array to implement a stack?

Categories: Data Structures

Personality

November 8, 2010 Leave a comment

Personality

Compiled by: Punit Jajodia(pnt.jjd@gmail.com) —>2K9 batch

Click here to download pdf

You can also visit the link http://www.scribd.com/doc/17056710/Personality for a great presentation on Personality.

Definition

Personality is a dynamic concept describing the growth and development of a person’s whole psychological system. According to Gordon Allport, “Personality is the dynamic organization within the individual of those psychophysical systems that determine his unique adjustments to the environment.”

Personality is best explained through the BIG FIVE model given by John Bearden. In contemporary psychology, the “Big Five” factors (or Five Factor Model; FFM) of personality are five broad domains or dimensions of personality which are used to describe human personality.

The Big five factors are Openness, Conscientiousness, Extraversion, Agreeableness, and Neuroticism (OCEAN, or CANOE if rearranged). The Neuroticism factor is sometimes referred to as Emotional Stability.

The Big Five factors and their constituent traits can be summarized as follows:

  • Openness – (inventive / curious vs. consistent / cautious). Appreciation for art, emotion, adventure, unusual ideas, curiosity, and variety of experience.

Openness is a general appreciation for art, emotion, adventure, unusual ideas, imagination, curiosity, and variety of experience. The trait distinguishes imaginative people from down-to-earth, conventional people. People who are open to experience are intellectually curious, appreciative of art, and sensitive to beauty. They tend to be, compared to closed people, more creative and more aware of their feelings. They are more likely to hold unconventional beliefs.

People with low scores on openness tend to have more conventional, traditional interests. They prefer the plain, straightforward, and obvious over the complex, ambiguous, and subtle. They may regard the arts and sciences with suspicion or even view these endeavors as uninteresting.

High score                                                                                                             Low score

  • Conscientiousness – (efficient / organized vs. easy-going / careless). A tendency to show self-discipline, act dutifully, and aim for achievement; planned rather than spontaneous behavior.

Conscientiousness is a tendency to show self-discipline, act dutifully, and aim for achievement. The trait shows a preference for planned rather than spontaneous behavior. It influences the way in which we control, regulate, and direct our impulses. Conscientiousness includes the factor known as Need for Achievement (NAch).

High score                                                                                   Low score


  • Extraversion – (outgoing / energetic vs. shy / reserved). Energy, positive emotions, surgency, and the tendency to seek stimulation in the company of others.

Extraversion is characterized by positive emotions, surgency, and the tendency to seek out stimulation and the company of others. The trait is marked by pronounced engagement with the external world. Extraverts enjoy being with people, and are often perceived as full of energy. They tend to be enthusiastic, action-oriented individuals who are likely to say “Yes!” or “Let’s go!” to opportunities for excitement. In groups they like to talk, assert themselves, and draw attention to themselves.

Introverts lack the social exuberance and activity levels of extraverts. They tend to seem quiet, low-key, deliberate, and less involved in the social world. Their lack of social involvement should not be interpreted as shyness or depression. Introverts simply need less stimulation than extraverts and more time alone. They may be very active and energetic, simply not socially.

High score                                                                                                             Low score


Agreeableness is a tendency to be compassionate and cooperative rather than suspicious and antagonistic towards others. The trait reflects individual differences in general concern for social harmony. Agreeable individuals value getting along with others. They are generally considerate, friendly, generous, helpful, and willing to compromise their interests with others. Agreeable people also have an optimistic view of human nature. They believe people are basically honest, decent, and trustworthy.

Disagreeable individuals place self-interest above getting along with others. They are generally unconcerned with others’ well-being, and are less likely to extend themselves for other people. Sometimes their skepticism about others’ motives causes them to be suspicious, unfriendly, and uncooperative.

High score                                                                                             Low score


Neuroticism is the tendency to experience negative emotions, such as anger, anxiety, or depression. It is sometimes called emotional instability. Those who score high in neuroticism are emotionally reactive and vulnerable to stress. They are more likely to interpret ordinary situations as threatening, and minor frustrations as hopelessly difficult. Their negative emotional reactions tend to persist for unusually long periods of time, which means they are often in a bad mood. These problems in emotional regulation can diminish the ability of a person scoring high on neuroticism to think clearly, make decisions, and cope effectively with stress.

At the other end of the scale, individuals who score low in neuroticism are less easily upset and are less emotionally reactive. They tend to be calm, emotionally stable, and free from persistent negative feelings. Freedom from negative feelings does not mean that low scorers experience a lot of positive feelings.

High score                                                                                                             Low score


.

Major personality traits influencing organizational behavior

1.Locus of control:                It is the degree to which people believe that they are the masters of their own fate. Individuals with a high internal locus of control believe that events result primarily from their own behavior and actions. Those with a low internal locus of control believe that powerful others, fate, or chance primarily determine events.

Those with a high internal locus of control have better control of their behavior, tend to exhibit more political behaviors, and are more likely to attempt to influence other people than those with a low external locus of control. Those with a high internal locus of control are more likely to assume that their efforts will be successful. They are more active in seeking information and knowledge concerning their situation.

One’s “locus” (Latin for “place” or “location”) can either be internal (meaning the person believes that they control their life) or external (meaning they believe that their environment, some higher power, or other people control their decisions and their life).

2.Machiavellianism(Mach)

Machiavellianism in politics is the political doctrine of Machiavelli, which denies the relevance of morality in political affairs and holds that craft and deceit are justified in pursuing and maintaining political power.

Machiavellianism can be summarized in the following three lines:

  • gain and use power.
  • Ends justify the means.
  • If it is worth it, use it.

An individual high in Mach is pragmatic(able to solve problems in a practical way), maintains emotional distance and believes that ends justify the means. Such individuals succeed in situations where there are minimum rules and regulations and in those which involve face to face interaction rather than indirect communication.

3.Self-esteem

People differ in the degree to which they like or dislike themselves. Self esteem determines the expectation of success by an individual. People having high self esteem believe that they possess the ability to succeed at work.

4.Self monitoring

Self monitoring refers to the process through which people regulate their own behavior in order to “look good” so that they will be perceived by others in a favorable manner. It distinguishes between high self-monitors, who monitor their behavior to fit different situations, and low self-monitors, who are more cross-situationally consistent.

5.Risk-Taking

High Risk-taking Managers

Make quicker decisions.
Use less information to make decisions.
Operate in smaller and more entrepreneurial organizations.

Low Risk-taking Managers

Are slower to make decisions.
Require more information before making decisions.
Exist in larger organizations with stable environments.

Risk Propensity :      Aligning managers’ risk-taking propensity to job requirements should be beneficial to organizations.

6.Personality types

Type A personality

Aggressive involvement in a chronic, incessant struggle to achieve more in less and less time and, if necessary, against the opposing efforts of other things or people.

Type A’s

1.       Are always moving, walking, and eating rapidly.

2.       Feel impatient with the rate at which most events are taking place.

3.       Strive to think or do two or more things at once.

4.       Cannot cope with leisure time.

5.       Are obsessed with numbers, measuring their success in terms of how many or how much of everything they acquire.

Type B’s

1.       Never suffer from a sense of time urgency with its accompanying impatience.

2.       Feel no need to display or discuss either their achievements or accomplishments unless such exposure is demanded by the situation.

3.       Play for fun and relaxation, rather than to exhibit their superiority at any cost.

4.       Can relax without guilt.

Learning

November 8, 2010 Leave a comment

Learning

Compiled by: Punit Jajodia(pnt_jjd@hotmail.com) —–>2K9 batch

Click here to download pdf

The  pdf version has parts in grey that are only for developing concepts and can be left out if you have less time.

Definition

According to E.R. Hilgard, learning is a relatively permanent change in behavior that occurs as a result of prior experiences.

W. McGehee says that learning has taken place if an individual behaves, reacts, responds as a result of experience in a manner different from the way he formerly behaved.

For simplicity sake, we can define learning as change in behavior through education and training, practice and experiences. It is accompanied by acquisition of knowledge, skills and expertise which are relatively permanent.

Learning process

The following steps are involved in the learning process:

1.        learning invariably involves a change.

2.        Change in behavior must be relatively permanent.

3.        Change in behavior should occur as a result of experience and training.

4.        The practice or expertise must be reinforced in order for learning to occur.

5.        Learning is reflected in behavior.

Theories of Learning

  • Classical conditioning

This theory of learning was given by Ivan Pavlov. The classical conditioning theory deals with association of one event with another desired one resulting in a desired behavior or learning.

The original and most famous example of classical conditioning involved the salivary conditioning of Pavlov’s dogs. During his research on the physiology of digestion in dogs, Pavlov noticed that, rather than simply salivating in the presence of meat powder (an innate response to food that he called the unconditioned response), the dogs began to salivate in the presence of the lab technician who normally fed them. Pavlov called these psychic secretions. From this observation he predicted that, if a particular stimulus in the dog’s surroundings were present when the dog was presented with meat powder, then this stimulus would become associated with food and cause salivation on its own. In his initial experiment, Pavlov used a bell to call the dogs to their food and, after a few repetitions, the dogs started to salivate in response to the bell.

It is a type of conditioning where an individual responds to some stimulus that would invariably produce such a response.

To understand classical conditioning better, we need to understand the following terms:

The Unconditioned Stimulus

The unconditioned stimulus is one that unconditionally, naturally, and automatically triggers a response. For example, when you smell one of your favorite foods, you may immediately feel very hungry. In this example, the smell of the food is the unconditioned stimulus.

The Unconditioned Response

The unconditioned response is the unlearned response that occurs naturally in response to the unconditioned stimulus. In our example, the feeling of hunger in response to the smell of food is the unconditioned response.

The Conditioned Stimulus

The conditioned stimulus is previously neutral stimulus that, after becoming associated with the unconditioned stimulus, eventually comes to trigger a conditioned response. In our earlier example, suppose that when you smelled your favorite food, you also heard the sound of a whistle. While the whistle is unrelated to the smell of the food, if the sound of the whistle was paired multiple times with the smell, the sound would eventually trigger the conditioned response. In this case, the sound of the whistle is the conditioned stimulus.

The Conditioned Response

The conditioned response is the learned response to the previously neutral stimulus. In our example, the conditioned response would be feeling hungry when you heard the sound of the whistle.

Stimulus         —————>          Response

Unconditioned stimulus     ————->         Unconditioned response

Conditioned stimulus   ————->          Conditioned Response

Here are a few more examples of classical conditioning:

1.             Fred has a fluffy down pillow with some of the down sticking out of the fabric. When he first tries out the pillow, a piece of down tickles his nose and he sneezes. This happens every time he goes to bed. Soon he sneezes every time he lays down on any kind of pillow.

2.             Every time you take a shower, someone in the house flushes the toilet causing the water to turn cold and you to become cold.  Now every time you hear a toilet flush, you get cold.

3.             It is springtime and the pollen from the flowers causes you to sneeze.  Soon you are sneezing every time you see a flower.

4.             In order to treat bedwetting, a pad that is sensitive to dampness is placed under the sheets.  When this pad becomes wet, it sounds an alarm and you wakeup.  Eventually you don’t need the alarm to wake up and your full bladder will wake you up.

5.             People receiving chemotherapy often vomit during or shortly after the procedure.  After several chemotherapy sessions, people begin feeling sick at the sight of the treatment room.

6.             Often times physicians will give treatments that make people feel uncomfortable (a shot for example).  After this happens several times, people will begin feeling uncomfortable at the sight of anyone in a white lab coat.

7.             Your significant other often yells at you and makes you feel bad. Pretty soon you can’t stand the look of that person and end the relationship.  You meet another person who looks like your ex. Although they seem nice, you find yourself feeling bad every time you are around them.

8.             The sight of food makes you hungry.  Soon every time you go into the kitchen, you feel hungry.

9.             One of your friends drinks several martinis while eating pepperoni pizza.  After becoming sick, she refuses to eat pepperoni pizza.

10.           You meet a new person who is an excellent cook. After a few superb meals you find yourself liking that person very much.

11.           Whenever you see a scary movie, you always eat a box of thin mints. Now you find that just seeing thin mints makes you feel scared.

12.           Whenever you go to bed you fall asleep very quickly. One week you have a lot of stress and instead of falling asleep you lie awake several nights in a row. Now, even though the stress is gone, you have difficulty sleeping in your bed.

  • Operant conditioning/Reinforcement

This theory of learning was given by B.F Skinner. He advocated that individuals emit responses that are rewarded and will not emit responses that either not rewarded or punished i.e. behavior is the function of its consequences.

As a behaviorist, Skinner believed that internal thoughts and motivations could not be used to explain behavior. Instead, he suggested, we should look only at the external, observable causes of human behavior.

Skinner used the term operant to refer to any “active behavior that operates upon the environment to generate consequences” (1953). In other words, Skinner’s theory explained how we acquire the range of learned behaviors we exhibit each and every day.

Examples of Operant Conditioning

We can find examples of operant conditioning at work all around us. Consider the case of children completing homework to earn a reward from a parent or teacher, or employees finishing projects to receive praise or promotions.

In these examples, the promise or possibility of rewards causes an increase in behavior, but operant conditioning can also be used to decrease a behavior. The removal of an undesirable outcome or the use of punishment can be used to decrease or prevent undesirable behaviors. For example, a child may be told they will lose recess privileges if they talk out of turn in class. This potential for punishment may lead to a decrease in disruptive behaviors.

Components of Operant Conditioning

Some key concepts in operant conditioning:

  • A reinforcer is any event that strengthens or increases the behavior it follows. There are two kinds of reinforcers:

1.        Positive reinforcers are favorable events or outcomes that are presented after the behavior. In situations that reflect positive reinforcement, a response or behavior is strengthened by the addition of something, such as praise or a direct reward.

2.        Negative reinforcers involve the removal of an unfavorable events or outcomes after the display of a behavior. In these situations, a response is strengthened by the removal of something considered unpleasant.

In both of these cases of reinforcement, the behavior increases.

  • Punishment, on the other hand, is the presentation of an adverse event or outcome that causes a decrease in the behavior it follows. There are two kinds of punishment:

1.        Positive punishment, sometimes referred to as punishment by application, involves the presentation of an unfavorable event or outcome in order to weaken the response it follows.

2.        Negative punishment, also known as punishment by removal, occurs when an favorable event or outcome is removed after a behavior occurs.

In both of these cases of punishment, the behavior decreases.

  • Social learning

“Learning would be exceedingly laborious, not to mention hazardous, if people had to rely solely on the effects of their own actions to inform them what to do. Fortunately, most human behavior is learned observationally through modeling: from observing others one forms an idea of how new behaviors are performed, and on later occasions this coded information serves as a guide for action.”
-Albert Bandura, Social Learning Theory, 1977

Social learning theory focuses on the learning that occurs within a social context. It considers that people learn from one another, including such concepts as observational learning, imitation, and modeling. Among others Albert Bandura is considered the leading proponent of this theory.

General principles of social learning theory follows:

1. People can learn by observing the behavior is of others and the outcomes of those behaviors.

2. Learning can occur without a change in behavior. Behaviorists say that learning has to be represented by a permanent change in behavior, in contrast social learning theorists say that because people can learn through observation alone, their learning may not necessarily be shown in their performance. Learning may or may not result in a behavior change.

3. Cognition plays a role in learning. Over the last 30 years social learning theory has become increasingly cognitive in its interpretation of human learning. Awareness and expectations of future reinforcements or punishments can have a major effect on the behaviors that people exhibit.

4. Social learning theory can be considered a bridge or a transition between behaviorist learning theories and cognitive learning theories.

The techniques of social learning are as follows:

1.Modelling and Symbolism

People are often reinforced for modeling the behavior of others. Bandura suggested that the environment also reinforces modeling. This is in several possible ways:

1, The observer is reinforced by the model. For example a student who changes dress to fit in with a certain group of students has a strong likelihood of being accepted and thus reinforced by that group.

2. The observer is reinforced by a third person. The observer might be modeling the actions of someone else, for example, an outstanding class leader or student. The teacher notices this and compliments and praises the observer for modeling such behavior thus reinforcing that behavior.

3. The imitated behavior itself leads to reinforcing consequences. Many behaviors that we learn from others produce satisfying or reinforcing results. For example, a student in my multimedia class could observe how the extra work a classmate does is fun. This student in turn would do the same extra work and also receive enjoyment.

4. Consequences of the model’s behavior affect the observers behavior vicariously. This is known as vicarious reinforcement. This is where in the model is reinforced for a response and then the observer shows an increase in that same response. Bandura illustrated this by having students watch a film of a model hitting a inflated clown doll. One group of children saw the model being praised for such action. Without being reinforced, the group of children began to also hit the doll .

2.Self efficacy:

People are more likely to engage in certain behaviors when they believe they are capable of executing those behaviors successfully. This means that they will have high self-efficacy. In layman’s terms self-efficacy could be looked as self confidence towards learning.

3.Forethought

These are two ways that people can control their own behavior. First they monitor and observe their own behavior, sometimes even scoring behavior. Secondly, people are also able to change their behavior by reinforcing themselves, by giving are withholding reinforcement.

4.Self regulation:

Self-regulation has come to be more emphasized in social learning theory. Self-regulation is when the individual has his own ideas about what is appropriate or inappropriate behavior and chooses actions accordingly.

  • Cognitive learning

Cognition means gaining learning through senses. It is a kind of learning that is achieved by thinking about the perceived relationship between events and individual goals. The processes within an individual concerned with receiving, perceiving and interpreting information make the individual learn new pattern behavior.

Human beings can learn efficiently by observation, taking instruction, and imitating the behavior of others.

“Cognitive learning is the result of listening, watching, touching or experiencing.”

Cognitive learning is a powerful mechanism that provides the means of knowledge, and goes well beyond simple imitation of others. Conditioning can never explain what you are learning from reading a  web-site. This learning illustrates the importance of cognitive learning.

Cognitive learning is defined as the acquisition of knowledge and skill by mental or cognitive processes — ;the procedures we have for manipulating information ‘in our heads’. Cognitive processes include creating mental representations of physical objects and events, and other forms of information processing.

How do we learn cognitive?

In cognitive learning, the individual learns by listening, watching, touching, reading, or experiencing and then processing and remembering the information. Cognitive learning might seem to be passive learning, because there is no motor movement. However, the learner is quite active, in a cognitive way, in processing and remembering newly incoming information.

Cognitive learning enables us to create and transmit a complex culture that includes symbols, values, beliefs and norms. Because cognitive activity is involved in many aspects of human behavior, it might seem that cognitive learning only takes place in human beings. However, many different species of animals are capable of observational learning. For example, a monkey in the zoo, sometimes imitates human visitors or other monkeys. Nevertheless, most information about cognitive learning is obtained from studies on human beings.