Monday, September 05, 2011

Snake Cube Solver

Spent some thirty hours during the holidays on this, got it working today ....
Oh, you ask what is a snake cube puzzle? A Google image search should give you an idea.

I wont put the solution here, you might be tempted to try it instead of trying to solve it yourself...

However the code is here:

#!/bin/perl
# What : Snake Cube Solver
# Who  : baswarna
# When : 06-Sep-2011
# Where: Bangalore
#

use POSIX;
#use strict;

################## DATA structures ##################
# Segments representation --> Hash with following entries
# segnum    : Segment number in the range of 0 to 16 (for the cube with 17 segments) I am having
# taillen   : Tail legnth of the segment (1 or 2 for 3X3X3 cube)
# fc        : Fulcrum co-ordinate
# spin      : Axis on which the segment can be rotated (x or y or z)
# moves     : list of moves, along with a flag indicating whether the move has been tried
# mvfound   : Flag indicating that the moves have been found for this segment
# mvtaken   : Indicates which of the allowed moves was taken 
# bounds    : 2D array with boundary entries for x, y and z (lower, upper)
@seg = (
        { segnum =>  0taillen => 2mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]], fc => [000], spin => 'y'},
        { segnum =>  1taillen => 1mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum =>  2taillen => 1mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum =>  3taillen => 2mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum =>  4taillen => 1mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum =>  5taillen => 2mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum =>  6taillen => 1mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum =>  7taillen => 1mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum =>  8taillen => 2mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum =>  9taillen => 2mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum => 10taillen => 1mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum => 11taillen => 1mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum => 12taillen => 1mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum => 13taillen => 2mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum => 14taillen => 2mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum => 15taillen => 2mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]},
        { segnum => 16taillen => 2mvfound => 0mvtaken => -1bounds => [[-22], [-22], [-22]]});

# moves_stack : stack of hashes with following entries (segnum, fc, pos)
@moves_stack = ();

# positions_taken :  For marking the positions taken. 5X5X5 (2n-1) for 3X3X3 cube
@positions_taken = ( [ [10000], [00000], [00000], [00000], [00000] ],
                     [ [00000], [00000], [00000], [00000], [00000] ],
                     [ [00000], [00000], [00000], [00000], [00000] ],
                     [ [00000], [00000], [00000], [00000], [00000] ],
                     [ [00000], [00000], [00000], [00000], [00000] ] );

# main : Main routine
# segidx : Pointing to the segment currently being considered
my $segidx = 0;
CUBE: while(1) {
    $curseg = $seg[$segidx];
    $nexseg = $seg[$segidx+1];

    # if mvfound is not true find moves for curseg
    if($curseg->{mvfound} == 0) {

        &find_moves($curseg);

        # set as true, the move found flag
        $curseg->{mvfound} = 1;
    }

    # Initialize the starting index for the remaining moves to be tried
    $mvstart = $curseg->{mvtaken} + 1;

    my $i;
    # foreach move
    MOVE: for($i = $mvstart$i <= 5$i++) {
        # continue if the move is not valid 
        next if($curseg->{moves}->[$i] == 0);
     
        # Find positions needed for the blocks of this segment
        &pos_needed($curseg$i);

        # If not overalapping and not out of bounds
        if( (&check_overlap($curseg->{pos}, $curseg->{taillen}) == 0) &&
            (&check_bounday_violation($curseg) == 0) ) {
            # set mvtaken to current move index
            $curseg->{mvtaken} = $i;

            # mark position in the matrix
            &mark_pos($curseg->{pos}, $curseg->{taillen}, 1);

            # Update bounds
            &update_bounds($curseg$i);

            # push move in to moves_stack
            push(@moves_stack, [$curseg->{segnum}, $curseg->{mvtaken}, $curseg->{fc}, $curseg->{pos}, $curseg->{taillen}]);

            # print_move("Added  ", $curseg->{segnum},  $curseg->{mvtaken}, $curseg->{fc}, $curseg->{pos}, $curseg->{taillen}) ;
         
            # print_bounds($segidx);

            # print_pos_taken();

            # get out of looping if all the segments are placed
            if($segidx == 16) {
                last CUBE;
            } else {
                # update next segment spin and fc if not last segment
                &update_next_seg($curseg$nexseg$iif($segidx <= 16);

                # Copy the curseg boundaries to nexseg
                &copy_bounds($curseg$nexseg);

                # increment segidx
                $segidx++;

                # go ahead to handling of next segment
                next CUBE;
            }
        } else {
            next MOVE; # if overlapping or out of bound try next move
        }
    }

    # if none of the moves workout backtrack as follows

    # set mvfound false
    $curseg->{mvfound} = 0;

    # Initialize mvtaken
    $curseg->{mvtaken} = -1;

    # Decrement segidx 
    $segidx--;

    # segidx < 0 flag error and stop
    if($segidx < 0) {
        print "Oosht\n";
        exit;
    }

    # for the previous segment:
    # Previous segment
    $prevseg = $seg[$segidx];

    # Delete positions in matrix
    &mark_pos($prevseg->{pos}, $prevseg->{taillen}, 0);

    # revert bounds to their previous value
    if($segidx > 0) {
        # taking it from prev-1 if prev != 0
        &copy_bounds($seg[$segidx-1], $prevseg);
    } else {
        # setting it to default if prev == 0
        $prevseg->{bounds} = [[-22], [-22], [-22]];
    }

    # Delete the top entry from moves_stack
    my $x = pop(@moves_stack);
 
    # print_move("Deleted", $x->[0],  $x->[1], $x->[2], $x->[3], $x->[4]) ;
         
    # print_bounds($segidx);

    # print_pos_taken();

    # go ahead to handling of previous segment

# End of while


# Print the moves_stack in the right order
foreach $x (@moves_stack) {
   print_move("Solved "$x->[0],  $x->[1], $x->[2], $x->[3], $x->[4]) ;
}

##################### Functions ####################
#
# find_moves           : Find the full set of available moves
sub find_moves
{
    # Choose the four possible moves, based on the spin, direction and sign
    # Encoding: x+, x-, y+, y-, z+, z-
    my $curseg = $_[0];
    my $spin = $curseg->{spin};
    ($curseg->{moves} = [001111] ) if ($spin eq 'x');
    ($curseg->{moves} = [110011] ) if ($spin eq 'y');
    ($curseg->{moves} = [111100] ) if ($spin eq 'z');

}

# pos_needed           : Find out the block positions to be taken
sub pos_needed
{
    my $curseg = $_[0];
    my $mvidx = $_[1];
    my $fc =  $curseg->{fc};

    (@shft = ([100],  [200]))  if($mvidx == 0);
    (@shft = ([-100], [-200])) if($mvidx == 1);
    (@shft = ([010],  [020]))  if($mvidx == 2);
    (@shft = ([0-10], [0-20])) if($mvidx == 3);
    (@shft = ([001],  [002]))  if($mvidx == 4);
    (@shft = ([00-1], [00-2])) if($mvidx == 5);

    # Positions are found for only the tail blocks, the fulcrum/hinge's position
    # is not in contention. Hence there are only two co-ordinae entries in $pos
    $curseg->{pos} = [ [ $fc->[0]+$shft[0][0], $fc->[1]+$shft[0][1], $fc->[2]+$shft[0][2] ],
                       [ $fc->[0]+$shft[1][0], $fc->[1]+$shft[1][1], $fc->[2]+$shft[1][2] ] ];

}

# check_bounday_violation : Check if the required positions are within the boundaries
sub check_bounday_violation
{
    my $curseg = $_[0];
    my $pos = $curseg->{pos};

    # Need to check boundary violation only for the block at the edge
    my $edgeidx = $curseg->{taillen}-1;
 
    my $x = $pos->[$edgeidx]->[0];
    my $y = $pos->[$edgeidx]->[1];
    my $z = $pos->[$edgeidx]->[2];

    # Current boundaries
    my $xl = $curseg->{bounds}->[0][0];
    my $xh = $curseg->{bounds}->[0][1];
    my $yl = $curseg->{bounds}->[1][0];
    my $yh = $curseg->{bounds}->[1][1];
    my $zl = $curseg->{bounds}->[2][0];
    my $zh = $curseg->{bounds}->[2][1];

    # Return 1 if there is a boundary violation
    if( ($x < $xl) || ($x > $xh) || ($y < $yl) || ($y > $yh) || ($z < $zl) || ($z > $zh) ) {
        return 1;
    } else {
       return 0;
    }

}

# update_bounds : Update the boundaries, if changed over the existing
sub update_bounds
{
    my $curseg = $_[0];
    my $mvidx  = $_[1];
    my $pos = $curseg->{pos};
    my $spin   = $curseg->{spin};
    my $direction = floor($mvidx/2); # idx 0,1 --> x; 2,3 --> y; 4,5 --> z

    my $edgeidx = $curseg->{taillen}-1;
    my $edge    = $pos->[$edgeidx]->[$direction];
    my $fc      = $curseg->{fc}->[$direction];

    # second index: 0 --> lower; 1 --> higher
    $curseg->{bounds}->[$direction][0] = ($edge - 2)
                                           if( ($edge > $fc) && ( ($edge - 2) > $curseg->{bounds}->[$direction][0] ) ) ;

    $curseg->{bounds}->[$direction][1] = ($edge + 2)
                                           if( ($edge < $fc) && ( ($edge + 2) < $curseg->{bounds}->[$direction][1] ) ) ;

}

# copy_bounds : Copy bound entries from one seg to other seg
sub copy_bounds
{
    my $srcseg = $_[0];
    my $dstseg = $_[1];
    my $i = 0;
    my $j = 0;

    for ($i = 0$i <= 2$i++) {
        for ($j = 0$j <= 1$j++) {
             $dstseg->{bounds}->[$i][$j] = $srcseg->{bounds}->[$i][$j];
        }
    }
}

# check_overlap : Check if any of the needed positions overlaps on an existing block
sub check_overlap
{
    my $pos = $_[0];
    my $taillen = $_[1];

    my $i;
    for($i = 0$i <= $taillen-1$i++) {
        # Return 1 if there is a overlap
        return 1 if ($positions_taken[$pos->[$i]->[0]][$pos->[$i]->[1]][$pos->[$i]->[2]]);
    }

    return 0;
}

# mark_pos : Mark/Clear the positions taken by the current segment
sub mark_pos
{
    my $pos     = $_[0];
    my $taillen = $_[1];
    my $val     = $_[2];
    my $i;
    for($i = 0$i <= $taillen-1$i++) {
        $positions_taken[$pos->[$i]->[0]][$pos->[$i]->[1]][$pos->[$i]->[2]] = $val;
    }
}

# update_next_seg : Update the spin and fc of the next segment based on the chosen move
sub update_next_seg
{
    my $curseg = $_[0];
    my $nexseg = $_[1];
    my $mvidx  = $_[2];
    my $pos = $curseg->{pos};
    my $direction = floor($mvidx/2); # idx 0,1 --> x; 2,3 --> y; 4,5 --> z

    my $edgeidx = $curseg->{taillen}-1;
    my $edge    = $pos->[$edgeidx]; 

    $nexseg->{spin} = 'x' if($direction == 0);
    $nexseg->{spin} = 'y' if($direction == 1);
    $nexseg->{spin} = 'z' if($direction == 2);

    $nexseg->{fc}->[0] = @$edge[0];
    $nexseg->{fc}->[1] = @$edge[1];
    $nexseg->{fc}->[2] = @$edge[2];
}

# Subroutine for printing move details
sub print_move
{
    my $text    = $_[0];
    my $segnum  = $_[1];
    my $mvtaken = $_[2];
    my $fc      = $_[3];
    my $pos     = $_[4];
    my $taillen = $_[5];

    print($text." : ".$segnum." : ".$taillen." : ".$mvtaken." : ");

    print("(".$fc->[0]."".$fc->[1]."".$fc->[2]."), ");

    for($i = 0$i <= $taillen-1$i++) {
        print("(".$pos->[$i]->[0]."".$pos->[$i]->[1]."".$pos->[$i]->[2]."), ");
    }

    print "\n";
}

sub print_bounds
{
    my $bounds = $seg[$_[0]]->{bounds};

    for ($i = 0$i <= 2$i++) {
        for ($j = 0$j <= 1$j++) {
              print($bounds->[$i][$j]."");
        }
    } 
    print "\n";
}

sub print_pos_taken
{
    for ($i = 0$i < 5$i++) {
        for ($j = 0$j < 5$j++) {
            print("[");
            for ($k = 0$k < 5$k++) {
                print($positions_taken[$i][$j][$k]."");
            }
            print("], ");
        }
        print("\n");
    }
}

Wednesday, November 10, 2010

ಮಧ್ಯಮವರ್ಗ

ಅವನು ಹುಬ್ಬು ಹಾರಿಸುವ ರೀತಿ, ಅವನು ತುಟಿ ತಿರುಗಿಸುವ ಪರಿ, ಬಾಯಿ ತೆರೆಯುವುದನ್ನು ಅರ್ಧಕ್ಕೇ ನಿಲ್ಲಿಸಿ ದುಡ್ಡುಕೊಡಲು ತಕರಾರು ಮಡುತ್ತ ನಿಂತವರನ್ನು ನೋಡುವ ವಿಧಾನ, ಇವೆಲ್ಲಾ ಒಮ್ಮೆ ವಿಸ್ಮಯಕಾರಕವಾಗಿದ್ದರೆ, ಮತ್ತೊಮ್ಮೆ ಭಯಾನಕ. ಮಿತ, ಅಮಿತ, ವಿಪರೀತ ಭಾವಗಳ ಅಪ್ರಾಸಂಗಿಕ, ಪ್ರಕಟಣೆಯಲ್ಲಿ ಪಳಗಿದ ಮುಖ - ದಿವಸಾ ಶೇವ್ ಕೇಳುತ್ತದೆ. ತುಟಿಗಳಮೇಲೆ, ಕಂಡೂ ಕಾಣದ ಲಿಪ್-ಗ್ಲೊಸ್ ಬದಲಾಗಿ, ದೂರದಿಂದ ಕಣ್ಣಂಚಿಗೆ ಬಿದ್ದಾಗ ಮುಖವನ್ನು ತಿರುಗಿಸಲು ಪ್ರಚೋದಿಸುವ ಗಾಢ ಕೆಂಪು ಬಣ್ಣ. ಬಣ್ಣದ ಸೆಳೆತಕ್ಕೆ ಸಿಕ್ಕು ತಿರುಗಿದ ಮುಖವನ್ನು ಹಿಡಿದು ನಿಲ್ಲಿಸಲು ಬೇಕಾದ ದಿಟ್ಟ ನೋಟ. ಮುಖದ ಮೇಲೆ ಎದ್ದು ಕಾಣುವ ಪೌಡರ್ - ಅಪ್ಪಟ ಲಿಂಗಾಯತರ ವಿಭೂತಿಯಂತೆ. ಕೆನ್ನೆಗಳಮೇಲೆ ಗುಲಾಬಿ ಬಣ್ಣ, ಚಿನ್ನದ ಪುಡಿ.

ಅಪ್ರಙ್ಞಾಪೂರ್ವಕವಾಗಿ ತಿರುಗಿ ನೋಡಿ, ಸಿಕ್ಕಿಬಿದ್ದ ಸ್ಟೇರಿಂಗ್ ವ್ಹೀಲ್ ಹಿಡಿದ ಪುರುಶಪುಂಗವನಿಗೆ, ಬೋನಲ್ಲಿ ಬಿದ್ದ ಹಕ್ಕಿಯ ಸಂಕಟ, ಮುಜುಗರದ ವಿಲವಿಲ ಭಾವ ಮತ್ತೂ ತನ್ನ ಕಾರ್ಯಸಮರ್ಥ ಬೀಜಗಳಬಗ್ಗೆ ಹೆಮ್ಮೆ, ತಾನು ಕಷ್ಟಪಟ್ಟು ಗಳಿಸಿದ್ದೇನೋ ಎಂಬಂತಹ ಭಾವ.

ಹಿಮ್ಮುಖವಾಗಿ ನಡೆಯುವ ಟ್ರಾಫಿಕ್ ಗಡಿಯಾರ ಇನ್ನೂ ನೂರರಿಂದ ಕೆಳಗಿಳಿಯದ್ದರ ಕಡೆಗೆ ಒಮ್ಮೆ ಕಣ್ಣುಹಾಯಿಸಿ, ಕಾರಿನ ಕಿಟಕಿಯಕಡೆಗೆ ಬರುವುದು ಮಾರ್ಜಾಲ ನಡಿಗೆಯಲ್ಲಿ. ಅವನು ಅವಳಂತೆ, ಕಾಣಲು ಅಲಂಕರಿಸಿಕೊಂಡಿರುವುದು ಜಗಜ್ಜಾಹೀರಾಗಿ, ಅವನಲ್ಲದ ಅವಳಲ್ಲದ ’ಮಧ್ಯದ್ದು’ ಎಂದು ಜನ ಅರ್ಥೈಸುತ್ತಿದ್ದಾಗ್ಯೂ, ಭಾವನಾತ್ಮಕವಾಗಿ ಅವನಿಗೆ ತನ್ನೊಳಗೆ ಓರ್ವ ಅವಳು ಭಾಸವಾಗುವುದರಿಂದ ಹೆಸರು ’ಕವಿತ’.

ಪದಬಂದ ಒಂದರ ಪರಿಹಾರ ಸೂಚಿ, ಎಡದಿಂದ ಬಲಕ್ಕೆ "ಕೈ ಮುಂದೆತೂರುತ್ತ ತಟ್ಟುವ ಚಪ್ಪಾಳೆ, ಆಮೇಲೆ ಅಮಿತಾಭ್-ಬಚ್ಚನ್ ಶೈಲಿಯಲ್ಲಿ ನೀಡಿದೆ".

ಬೇಡುವ ಭಿಕ್ಷುಕರು, ಬೆನ್ನು ಬಗ್ಗಿಸಿ, ತಲೆ ಮುಂದಾಗಿಸಿ, ಆರ್ತನಾದ ಹೊಮ್ಮಿಸಿ, ಮುಖ ಕಿವುಚಿಕೊಂಡು ಕೈ ನೀಡಿದರೆ... ಕವಿತಳದ್ದು, ನಿಮಿರಿದ ಎದೆ, ದಿಟ್ಟ ನೋಟ, ಹಕ್ಕು ಚಲಾವಣೆ ಧ್ವನಿಯ ’ಕೊಡು’. ಅದು, ಟ್ರಾಫಿಕ್ಕಿಗ, ಮಹಾರಾಣಿ ಕವಿತಾರಾಣಿ ಅವರಿಗೆ ಕೊಡಬೇಕಾದ ಕಪ್ಪ! ನಖರಾ ತೋರಿಸಿ ಕಾಸು ಕೊಡದವರಿಗೆ ತಮ್ಮ ’ಅರ್ಧ’ಲಿಂಗದರ್ಶನ ಮಾಡಿಸಿ ಮುಜುಗರಾನಂದದ ಅತಿರೇಕಕ್ಕೆ ತಳ್ಳದೇ ಬಿಡರು ಮಹಾರಾಣಿ ಕವಿತೆ. ಏಸಿ ಕಾರಲ್ಲಿ ಆರಾಮಾಗಿ ಕೂತುಕೊಂಡು, ಮೂಗಿನ ತುದಿಯಲ್ಲಿ ಅಸಹನೆ ತುಂಬಿಕೊಂಡು, ಹುಬ್ಬುಗಂಟಾಕಿಕೊಂಡು, ಕಾಡುವ ಭಿಕ್ಷುಕರನ್ನು ಗದರಿಕೊಂಡಂತೆ ಗದರಿದರೆ ಮಾತ್ರ ಕವಿತೆಗೆ ಎಲ್ಲಿಲ್ಲದ ಕೋಪ. ಕ್ಯಾಕರಿಸಿ ಉಗಿದೂ ಬಿಟ್ಟಾಳು. ಏನೂ ತಪ್ಪುಮಾಡದೆಯೇ ಜನರಿಂದ ನಿಕೃಷ್ಟನೆನಿಸಿಕೊಳ್ಳುವುದು, ತುಚ್ಛನೆಂಬಂತೆ ನೋಡಿಸಿಕೊಳ್ಳುವುದು, ಕುಹಕದ ನಗೆ ನಗಿಸಿಕೊಳ್ಳುವುದು ಹಣೇಬರಹ.

ಒಂದಿನ, ಸಿಗ್ನಲ್ಲಲ್ಲಿ ನಿಂತಾಗ ಅವಳು ಬರುತ್ತಿರುವುದನ್ನ ನೋಡಿ, ತಪ್ಪಿಸಿಕೊಂಡುಬಿಡುವ ಆತುರದಲ್ಲಿ ರಾಟೇಸುತ್ತಿ ಕಾರಿನ ಗಾಜೆತ್ತುತ್ತಾ ಅರ್ಧಕ್ಕೆ ಬಂದಿದ್ದಾಗ ಸಿಕ್ಕು ಬಿದ್ದೆ. "ಗಾಜೆತ್ತ್ ಬೇಡ. ’ಇಲ್ಲ’ ಅನ್ನು ಸುಮ್ನೆ ಒಟೋಗ್ತೀನಿ. ಗಾಜೆತ್ತ್ ಬೇಡ. ಇನ್ಸಲ್ಟಾಗುತ್ತೆ." ದುಡ್ಡಿಸಕೊಳ್ಳಲಿಲ್ಲ. ನನ್ನಕಣ್ಣಲ್ಲಿ ’ರಿಮಾರ್ಸ್’ ಹುಡುಕುತ್ತ ಮೂರು ಸೆಕೆಂಡು ಹಾಗೇ ನಿಂತ. ನಂತರ ಹಾಗೇ ಹೊರಠೋದ್ಲು, ಕವಿತ.
ಕೇಳಬೇಕಿಂದಿದ್ದೆ, ನಮ್ಮ ಮ್ಯಾನೇಜರ್ ಕೇಳುವಂತೆ
"ನಿನ್ನ ವೃತ್ತಿಜೀವನದ ಗುರಿ ಏನು?
ನಿನ್ನ ಪರಿಸ್ಥಿತಿ ನಿನ್ನ ಆಯ್ಕೆಯೋ, ಅನಿವಾರ್ಯತೆಯೊ?"
ಅಥವ
"ಇನ್ನೈದು ವರ್ಶಗಳಲ್ಲಿ ಏನಾಗಿರಬೇಕೆಂಬುದು ನಿನ್ನ ಉದ್ದೇಶ?".

ಕೇಳಿದ್ದರೆ ಪ್ರಾಯಶಃ "ಇನ್ನೈದು ವರ್ಶಗಳಲ್ಲಿ ಒಂದು ದೊಡ್ಡ ಘೇಂಡಾ ಮೃಗವಾಗಿ ನಿನ್ನ ಕಾರಿಗೆ ಢಿಕ್ಕಿಹೊಡೀಬೇಕು ಅಂದ್ಕೊಂಡಿದೀನಿ, ಅದಕ್ಕೇ ಪ್ಲಾಸ್ಟಿಕ್ ಸರ್ಜರೀಗೆ ದುಡ್ಡು ಕೂಡುಹಾಕ್ತಾ ಇದೀನಿ, ನಿಮ್ಮಕೈಲಿ ಎಷ್ಟಾಗುತ್ತೋ ಅಷ್ಟು ಕೊಡಿ" ಎಂದಿದ್ದಾಳು, ಆದರೆ ಬೇಜಾರು ಮಾಡಿಕೊಂಡು ಹೊರಟು ಹೋಗಿದ್ದಳು ಅಷ್ಟರಲ್ಲಿ. ಈಗಿನ ಕಾಲದಲ್ಲಿ ಯಾರೂ ಅಮಾಯಕರಲ್ಲ. ಕೊಡಲೇಬೇಕು ಕವಿತಳಿಗೆ, ಅವಳನ್ನ ಅರ್ಥಾ ಮಾಡಿಕೊಳ್ಳದ್ದಕ್ಕೆ, ಅವಳೊಂದಿಗೆ ಹೊಂದಿಕೊಳ್ಳಲಾಗದ್ದಕ್ಕೆ ತಪ್ಪು ಕಾಣಿಕೆ.

Tuesday, January 05, 2010

DW_7

The pictures from trek are here. The pics from Divya and Swarna's extended trip are here.


~~~*~~~*~~~*~~~


Well, I missed it :( I did not see him slapped myself. He was just narrating his story to two foujies. The foujies who were on the look out for the TT, to get berths on their waitlisted tickets.


The slapped was a Meena, from of course where else… the same place where Adil, the superstar stand up comedian of DW_7 is from - Rajasthan.


Back to the slap now… Mr. Meena, with a medium frame, lean body, buckteeth and a long face. Buckteeth somewhat affecting his already drawling speech. Also, unlike his Meena cohorts, many of whom are big shot civil service officers, working for the GOI, this Mr. Meena an attendant in the 3-tier AC, compartment-B2 of train 2094-Golden Temple Express, the western railways train from Amritsar to Mumbai – surprisingly clean. I and Divya traveling to Delhi, after the horrible experience at the Attari border in Amritsar. There is no space to see anything there there is just a lot of people wanting to see it – the retreat ceremony I mean.


Meena’s job is to see that the passengers of B2 compartment get all their stuff in the train, like the rugs, the sheets, and pillows, quite a job isn’t it!


Meena was slapped by a guy trying to enter B2, without a valid ticket.


That’s illegal! Nobody can do that. Even if somebody does enter B2 without a valid ticket, they can’t slap the attendant - that is doubly illegal!


Meena was slapped without provocation, on the line of the duty, in the middle of the night, when he opened the shutter separating the pantry car and the B2. He had closed it to protect B2 from the outside world. Of course he did not open it just like that… he heard wild banging against it, he was just making sure that the B2 passengers, the valued customers of western railways are not woken from all the noise. He had earlier let the foujies in though, after he made sure that they are the guardians of our nation itself and are willing to be friendly with him and promised not to slap him.


The episode: Meena asked the intruder to show his ticket; the intruder shows an invalid ticket and asks Meena to show his ID card; just when Meena puts his hand in his pocket; zhoop comes the slap!


The intruder however is facing the consequences of his actions now. He is with the railway police. And so is the person who came running to see what the altercations are all about. He got accidentally booked as an accomplice in the slap.


May be there are many IAS officers in Mr. Meena’s clan, but that is not the mistake of this Meena for god’s sake. And we hope that Meena has the last laugh - with the intruders convicted for their wrong doings. As of now, Mr. Meena is already managing a buckteeth grin, narrating his story to the foujies!


Everybody wants to tell their stories, especially the ones they have thoroughly enjoyed it, like Mr. Meena, for some strange reason he seems to have thoroughly enjoyed being slapped!


Doesn’t’ the occasion calls for a song… how about this one…


(Quite a song… Learnt it during the trek! Go on… keep singing… it is iambic pentameter I suppose)


We want everybody to be happy!

We want everybody to be glad!

We want everybody happy in the world!

We don’t want anybody sad!


Yea, sure, even the guy who slapped Meena... For sure he must have enjoyed the act of slapping somebody! May be he hadn’t slapped anybody for quite a while :)


If not for Mr. Meena being slapped, we were kinda totally outa any entertainment during twelve hour train journey fog delayed by three hours. Thankfully he was slapped and we, I mean, I, Divya, the foujies and who ever else heard his story and above all Mr. Meena himself are happy and glad!


~~~*~~~*~~~*~~~


You may ask - How do I, a stupid south Indian frog, circling around in my own stupid filthy south Indian well, know anything at all about the Meenas of Rajasthan? About how they have gotten classified as ST’s undeservingly, and how they kinda dictate terms in Rajastan politics? I wouldn’t! Had I not been in room 203 of the YHAI base camp at Dalhousie – thanks to Varun, Adil and the other (apart from Varun) would be teacher from Hariyana, whose name I couldn’t quite commit to my memory. It is interesting to know such stuff, about these Gujjar’s and the Meena’s and all these crazy people from these crazy parts of our country. Believe it or not, lying down on your bunkers and getting comfortably inside the thick sleeping bags makes the best interlocution setup.


~~~*~~~*~~~*~~~


The mountaineering folks, going out there in maddening cold and all snow for months and taking extreme risks and some times just dieing out there… they must be real crazy to do all that! Thank god, trekking is not like that… trekking, especially the YHAI ones, are, actually, in reality, if you want to know the truth, believe it or not, are just… extended picnics!


Many of the folks in the trek, do start longing for the comforts of home, and a neat bed, and a warm quilt, and a caring family, and a shave and a haircut etc. some time during a six day long winter trek conducted by YHAI. However, you can’t deny the fact that at 1800 bucks, this is real value for money! I mean the trek and all the stuff coming with it… the interesting people, the forests, the food, and the places, the conversations and so on and so forth. One comment about the food though - some times it is sookha poori, but what say – itne paiseme itnaheech milenga!


Well talking of a shave, I do get a shave in Chamba on the penultimate day of our trek, in a shabby shack of a saloon. He really makes me look good, the barber. The shave’s quite worth the money, at 15 bucks, topped with a 5 tip. And then I thinks… shouldn’t I get a face massage as well! It looks to be cheap at 50 bucks, the ones you get in the spa’s costing over a 1000 make you loose all the sense of comfort just thinking of the at the end. Well, the 50 buck massage… quite a disappointment… my mom sure does a better job of oiling my hair. I will run back home after the trek and get my hair oiled by my mother… you can’t quite get such a thing as a mother oiling and massaging your hair on a trek! What to do you have to make live with it.


However, you can't quite get, the kind of Gulab Jamoons and Samosas we (Pramod, Sangeeta, Rajeev, Divya and me) ate on a Chamba road side stall, in Bangalore. Excuse me believers, but, I wold rate this higher to the Lakshminarayan temple and the Church.


~~~*~~~*~~~*~~~


Fire fire, camp fire; fire, fire, camp fire:


I have never seen such a leisurely activity as a campfire so formalized; and after all the formality, there is no actual fire, let alone the booze and the barbeques. And have anybody heard of a campfire inside a dining hall? However, in spite of all this, and in spite of no barbeque and no booze, it is still fun! There are jokes, songs, carols, prayers, and some choir song singing which are more like a ring master orchestrating a heard. Yes, many find the ring master act fun too!


When the night falls and the camp fire starts…


Amrish Puri comes alive with laddoos from his Lado.


Kids from Orrissa start reciting their masterly poetry, where the Chuha mare haati ko laat.


And the lovely madam’s from Bangal and Gujarat and UP and Andhra come alive in songs with their Belans and lipsticks. Just that the lovely one from Andhra is forgetting for that moment that, may be, by her next trek, she would be a telangani. That doesn’t make her any less lovely, does it?


And finally, the master of the ceremony takes care of the lovely madams no better than themushtanda javans!


And the actual lure of the camp fire… the so called Bournvita, you can fill your mug and go for few refills too, just that you can’t leave the dining area!


Who would deny this…? Samuel the orator is quite a character, the field director; but such a pity he has no field, and no, he is not directing any movie either.


~~~*~~~*~~~*~~~


Walk, climb, jump - from camp to camp:


Some lag behind and some get ahead – as in life; and some stay back to company other they like – as in life; and even some others, stay rear to company those whom they fear – as does happen in life! Some find it fulfilling to help others; of course they expect nothing in return! Some just hang around in their groups, chatting and singing and eating and walking. And, some are just somewhat pissed off that the others are slowing them down, even when they are strong enough to walk and make up the lost ground! As in life?


Reach another camp after a tiring days walk, and then talk… of movies, and books, and music and life in general.


Cell phones light up in the pitch dark of the Kala top; they play music, exciting, enchanting, and bring back old memories.


O Reva (Indian Ocean)

Hungama Hai kyon Burpa

Hum ko kiske gum ne mara (Ghulam Ali)

Aroozoo kya Hai/ Justajoo Kya hai(Lata Mangeshkar) and many more on many other cell phones. I too can listen to them now, thanks to Bluetooth!


And there is hot soup, quite a medicine for the cold of the evening, also bhajji and bonda and pakoda (The stupid English, they like some how like to write the same thing as pakora!).


~~~*~~~*~~~*~~~


Nature! Splendid nature! in all her glory, revels in her various forms, mountains, distant snow peaks, oak forests, cold streams tumbling down the slopes… just the one thing lacking – the snow veil! Who can help? Aren’t we the reason, denying the nature of her snow? Causing global warming and all.


Note: By 'we' I mean humans in general. Aren't the stupid Americans skewing the average quite badly? Poor Indians!


~~~*~~~*~~~*~~~


Finishing the trek, I and Divya go to McLeod Ganj, quite cold there and quite interesting with all the firang tourists. The street markets flooded with crap the firang are willing to buy! But honestly, the markets are interesting and so is the Bagsu nag temple and the Buddhist temple and the Tibetan museum, but seriously the Buddhist temples in Bylakuppe, Kushalnagar Taluk, Coorg district in Karnataka are any day better then the McLeod Ganj stuff.


Eating the Lunger food at the Darbar Sahib is some experience! I would any day do this again. Not great food, but some how an amazingly fulfilling experience.


The Waggah border; huh; I don't know the English word to explain it, the most apt I can think of is – Phaltoo.


~~~*~~~*~~~*~~~


After I recollect everything, I can't quite end this stuff without mentioning of a situation I and Divya got in to on the train from Pathankot to Amritsar.


There was this non-sardar, some what normal looking middle age guy, sitting besides us on the other chair of this Chair-car compartment. I was getting bored and tried to make conversatio. There was acually a Sardar sitting across him, but the Sardar didn't seem to speak Hindi.


I was generally trying intorduce myself, telling him about where I am from (Bangalore of course) and telling this guy about how I, and my wife here, trekked in Himachal and then went to Dharamshala and are now heading to Amritsar. I usually see a warm response and sharing of some valuable information about the place and the people, when I initiate such talks.


But, this time... our hero, as soon as he hears that I am from Bangalore, develops a strong suspicion of my story. He seriously believes that I am some sort of a pimp from Bangalore trafficking girls from Patiala, to the illegal dance bars of Bangalore!


And looking at how happy Divya is (For some strange reason, she was being good to me that day.) he thinks that this Patiala girl is all excited to go to Bangalore and willingly so!


Our hero then starts quite an interrogation... he even ask me if I know any such Punjabi girl!


Nobody ever suspected that I could be that kind of a guy... [How did he catch me :) ] as soon as I smell this guys ideas, I make it clear that I personally am not acquainted with any Punjabi girl in any Bangalore dance bar, and make it clear that I am not for legalization of prostitution (mind you... he was very enthusiastically for it.). Also, I attempt to explain how a girl can't probably get in to the body business unless she is forced by people or situations (Thanks to the Outlook article on the topic I happened read during the trek).


But, our hero doesn't budge. Given that there were very few people in that compartment, the situation started getting real scary. I just stopped talking to this guy, went and sat besides Divya and tried not to look at him again. He was staring at us for a long time.


Eventually he let go.


Wahe guru de khals; wahe guru the phate.


~~~*~~~*~~~*~~~


Writing all this… I realize… what a stupid voice I’v got… especially writing some part of this blog… But, me realize… me can’t get no better... me always farts in the tent. My eternal apologies trekker comrades… wherever you are… Bangalore, Delhi, Pune, Mumbai, Jaipur, Chennai, Gujarat or which ever other godforsaken place. Me means no harm, just can’t hold back me farts… you know, it is very cold out there, may be I can help heat up the tent. You are welcome! Join me... this is what I love doing the most (as said by Manjari the ring master)

We want everybody to be happy!

We want everybody to be glad!

We want everybody happy in the world!

We don’t want anybody sad!


ಜೈ ಕನ್ನಡಾಂಬೆ ಜೈ ಕರ್ನಾಟಕ