'''
Created on Oct 31, 2011
@author: rodger
'''

        
def printFirstWithLasts(namemap):
    print "Print Unique First Names with all Last Names"      
    #TODO:






    
    
def mapNameToNumberLastNames(countmap, data):
    '''
    countmap is a map of first names to its number of occurrences
    The parameter data is a list of lists where each list is two  
    strings representing the first and last name of a person.         
    '''
    #todo:
    print







            
def  mapNameToLastNames(namemap, data):
    '''
    namemap is a map of first names to list of corresponding last names 
    The parameter data is a list of lists where each list is two  
    strings representing the first and last name of a person.    
    '''  
    #todo:
    print








def  mapNameToSetLastNames(namesetmap, data):
    '''
    namemap is a map of first names to list of corresponding last names 
    The parameter data is a list of lists where each list is two  
    strings representing the first and last name of a person.    
    '''  











def main():
    '''
    This is popularMap without files
    namelist is defined below
    '''
    namelist = [['Susan', 'Smith'], ['Jackie', 'Long'], ['Mary', 'White'], ['Susan', 'Brandt'], ['Jackie', 'Johnson'], ['Susan', 'Rodger'], ['Mary', 'Rodger'], ['Eric', 'Long'], ['Susan', 'Crackers'], ['Mary', 'Velios'], ['Jack', 'Frost'], ['Eric', 'Lund'], ['Susan', 'Krishnan'], ['Bala', 'Krishnamurthy'], ['Craig', 'Wills'], ['Carol', 'Wills'], ['Craig', 'Partridge'], ['Craig', 'Kim'], ['Craig', 'Matthews'], ['Bala', 'Yavatkar'], ['Susan', 'Perilous'], ['Mary', 'Evans'], ['Kara', 'Krishnan'], ['Susan', 'Smithereens']]
    print "namelist is: ", namelist 
    print

    countmap = {}
    mapNameToNumberLastNames(countmap, namelist)
    print countmap
    
    namemap = {}
    mapNameToLastNames(namemap, namelist)
    print namemap
    
    namesetmap = {}
    mapNameToSetLastNames(namesetmap, namelist)
    print namesetmap    
         
    printFirstWithLasts(namemap)
    print
    
    #TODO: Compute maxnum    
    maxnum = 0
    
    
    
    print "maximum number of corresponding last names is ",
    print maxnum
    print
    #TODO: compute lastIndex - list of names with max number last names
    lastIndex = ["none"]
   
    
    
    
    print "first name with most last names is:"
    #TODO:
 
 
 
    
if __name__ == "__main__":
    main() 
        
     
