Menu

(Solved) : Example Input Csv File 1 Dijiang M 24 180 80 China Chn 1992 Summer 1992 Summer Barcelona B Q30764586 . . .

COMP20003 Algorithms and Data Structures Second (Spring) Semester 2018 [Assignment 1] Olympics Datasets Information Retrieval using Binary Search Trees Handed out: Friday, 17 of August Due: 8:00 AM, Monday, 3 of September Purpose The purpose of this assignment is for you to: Increase your proficiency in C programming, your dexterity with dynamic memory allocation and your understanding of linked data structures, through programming a dictionary. Increase your understanding of how computational complexity can affect the performance of an algorithm by conducting orderly experiments with your program and comparing the results of your experimentation with theory. Increase your proficiency in using UNIX utilities. Background A dictionary is an abstract data type that stores and supports lookup of key, valuc pairs. For cxample, in a telephone directory, the (string) key is a person or company name, and the value is the phone number. In a student record lookup, the key would be a student ID number and the value would be a complex structure containing all the other information about the student. A dictionary can be implemented in C using a number of underlying data structures. Any implemen tation must support the opcrations: makedict a new dictionary; insert a new item (key, valuc pair) into a dictionary; search for a key in the dictionary, and return the associated value. Most dictionaries will also support the operation delete an item. Your task In this assignment, you will create a simplified UNIX Information Retrieval system, a search engine as a concrete instance of a dictionary, and well use it to look up information about Olympic athletes. Youll search how many medals an athlete won overall the competitions. There are two stages in this project. In each stage you will code a dictionary in the C programming language. A binary search tree will be the underlying data structure for both stages In this assignment the search keys are not guaranteed to be unique. In this assignment we use variants of the binary search tree designed to handle duplicates, i.e. by either dividing nodes using <- >, or by using < > and a linked list for items with same key. You will use a Makefile to direct the compilation of two separate executable programs, one for Stage 1 and one for Stage 2, each of which uses a different variant of the binary search tree In both stages of the assignment, you will insert records into the dictionary from a file. You will then look up and output the records (data) contained by the dictionary, counting and outputting the num- ber of key comparisons used in the search.

Here is some example input from the .csv file:

1,A Dijiang,M,24,180,80,China,CHN,1992Summer,1992,Summer,Barcelona,Basketball,Basketball Men’sBasketball,NA
2,A Lamusi,M,23,170,60,China,CHN,2012Summer,2012,Summer,London,Judo,Judo Men’sExtra-Lightweight,NA
3,Gunnar Nielsen Aaby,M,24,NA,NA,Denmark,DEN,1920Summer,1920,Summer,Antwerpen,Football,Football Men’sFootball,NA
4,Edgar Lindenau Aabye,M,34,NA,NA,Denmark/Sweden,DEN,1900Summer,1900,Summer,Paris,Tug-Of-War,Tug-Of-War Men’sTug-Of-War,Gold
5,Christine Jacoba Aaftink,F,21,185,82,Netherlands,NED,1988Winter,1988,Winter,Calgary,Speed Skating,Speed Skating Women’s 500metres,NA
5,Christine Jacoba Aaftink,F,21,185,82,Netherlands,NED,1988Winter,1988,Winter,Calgary,Speed Skating,Speed Skating Women’s 1000metres,NA
5,Christine Jacoba Aaftink,F,25,185,82,Netherlands,NED,1992Winter,1992,Winter,Albertville,Speed Skating,Speed Skating Women’s500 metres,NA
5,Christine Jacoba Aaftink,F,25,185,82,Netherlands,NED,1992Winter,1992,Winter,Albertville,Speed Skating,Speed Skating Women’s1000 metres,NA
5,Christine Jacoba Aaftink,F,27,185,82,Netherlands,NED,1994Winter,1994,Winter,Lillehammer,Speed Skating,Speed Skating Women’s500 metres,NA
5,Christine Jacoba Aaftink,F,27,185,82,Netherlands,NED,1994Winter,1994,Winter,Lillehammer,Speed Skating,Speed Skating Women’s1000 metres,NA
6,Per Knut Aaland,M,31,188,75,United States,USA,1992Winter,1992,Winter,Albertville,Cross Country Skiing,Cross CountrySkiing Men’s 10 kilometres,NA
6,Per Knut Aaland,M,31,188,75,United States,USA,1992Winter,1992,Winter,Albertville,Cross Country Skiing,Cross CountrySkiing Men’s 50 kilometres,NA
6,Per Knut Aaland,M,31,188,75,United States,USA,1992Winter,1992,Winter,Albertville,Cross Country Skiing,Cross CountrySkiing Men’s 10/15 kilometres Pursuit,NA
6,Per Knut Aaland,M,31,188,75,United States,USA,1992Winter,1992,Winter,Albertville,Cross Country Skiing,Cross CountrySkiing Men’s 4 x 10 kilometres Relay,NA
6,Per Knut Aaland,M,33,188,75,United States,USA,1994Winter,1994,Winter,Lillehammer,Cross Country Skiing,Cross CountrySkiing Men’s 10 kilometres,NA
6,Per Knut Aaland,M,33,188,75,United States,USA,1994Winter,1994,Winter,Lillehammer,Cross Country Skiing,Cross CountrySkiing Men’s 30 kilometres,NA
6,Per Knut Aaland,M,33,188,75,United States,USA,1994Winter,1994,Winter,Lillehammer,Cross Country Skiing,Cross CountrySkiing Men’s 10/15 kilometres Pursuit,NA
6,Per Knut Aaland,M,33,188,75,United States,USA,1994Winter,1994,Winter,Lillehammer,Cross Country Skiing,Cross CountrySkiing Men’s 4 x 10 kilometres Relay,NA
7,John Aalberg,M,31,183,72,United States,USA,1992Winter,1992,Winter,Albertville,Cross Country Skiing,Cross CountrySkiing Men’s 10 kilometres,NA
7,John Aalberg,M,31,183,72,United States,USA,1992Winter,1992,Winter,Albertville,Cross Country Skiing,Cross CountrySkiing Men’s 50 kilometres,NA
7,John Aalberg,M,31,183,72,United States,USA,1992Winter,1992,Winter,Albertville,Cross Country Skiing,Cross CountrySkiing Men’s 10/15 kilometres Pursuit,NA
7,John Aalberg,M,31,183,72,United States,USA,1992Winter,1992,Winter,Albertville,Cross Country Skiing,Cross CountrySkiing Men’s 4 x 10 kilometres Relay,NA
7,John Aalberg,M,33,183,72,United States,USA,1994Winter,1994,Winter,Lillehammer,Cross Country Skiing,Cross CountrySkiing Men’s 10 kilometres,NA
7,John Aalberg,M,33,183,72,United States,USA,1994Winter,1994,Winter,Lillehammer,Cross Country Skiing,Cross CountrySkiing Men’s 30 kilometres,NA
7,John Aalberg,M,33,183,72,United States,USA,1994Winter,1994,Winter,Lillehammer,Cross Country Skiing,Cross CountrySkiing Men’s 10/15 kilometres Pursuit,NA
7,John Aalberg,M,33,183,72,United States,USA,1994Winter,1994,Winter,Lillehammer,Cross Country Skiing,Cross CountrySkiing Men’s 4 x 10 kilometres Relay,NA
8,Cornelia Aalten (-Strannood),F,18,168,NA,Netherlands,NED,1932Summer,1932,Summer,Los Angeles,Athletics,Athletics Women’s 100metres,NA
8,Cornelia Aalten (-Strannood),F,18,168,NA,Netherlands,NED,1932Summer,1932,Summer,Los Angeles,Athletics,Athletics Women’s 4 x 100metres Relay,NA
9,Antti Sami Aalto,M,26,186,96,Finland,FIN,2002Winter,2002,Winter,Salt Lake City,Ice Hockey,Ice Hockey Men’s IceHockey,NA
10,Einar Ferdinand Aalto,M,26,NA,NA,Finland,FIN,1952Summer,1952,Summer,Helsinki,Swimming,Swimming Men’s 400 metresFreestyle,NA
11,Jorma Ilmari Aalto,M,22,182,76.5,Finland,FIN,1980Winter,1980,Winter,Lake Placid,Cross Country Skiing,Cross CountrySkiing Men’s 30 kilometres,NA
12,Jyri Tapani Aalto,M,31,172,70,Finland,FIN,2000Summer,2000,Summer,Sydney,Badminton,Badminton Men’sSingles,NA
13,Minna Maarit Aalto,F,30,159,55.5,Finland,FIN,1996Summer,1996,Summer,Atlanta,Sailing,Sailing Women’sWindsurfer,NA
13,Minna Maarit Aalto,F,34,159,55.5,Finland,FIN,2000Summer,2000,Summer,Sydney,Sailing,Sailing Women’sWindsurfer,NA
14,Pirjo Hannele Aalto (Mattila-),F,32,171,65,Finland,FIN,1994Winter,1994,Winter,Lillehammer,Biathlon,Biathlon Women’s 7.5kilometres Sprint,NA
15,Arvo Ossian Aaltonen,M,22,NA,NA,Finland,FIN,1912Summer,1912,Summer,Stockholm,Swimming,Swimming Men’s 200 metresBreaststroke,N

COMP20003 Algorithms and Data Structures Second (Spring) Semester 2018 [Assignment 1] Olympics Datasets Information Retrieval using Binary Search Trees Handed out: Friday, 17 of August Due: 8:00 AM, Monday, 3 of September Purpose The purpose of this assignment is for you to: Increase your proficiency in C programming, your dexterity with dynamic memory allocation and your understanding of linked data structures, through programming a dictionary. Increase your understanding of how computational complexity can affect the performance of an algorithm by conducting orderly experiments with your program and comparing the results of your experimentation with theory. Increase your proficiency in using UNIX utilities. Background A dictionary is an abstract data type that stores and supports lookup of key, valuc pairs. For cxample, in a telephone directory, the (string) key is a person or company name, and the value is the phone number. In a student record lookup, the key would be a student ID number and the value would be a complex structure containing all the other information about the student. A dictionary can be implemented in C using a number of underlying data structures. Any implemen tation must support the opcrations: makedict a new dictionary; insert a new item (key, valuc pair) into a dictionary; search for a key in the dictionary, and return the associated value. Most dictionaries will also support the operation delete an item. Your task In this assignment, you will create a simplified UNIX Information Retrieval system, a search engine as a concrete instance of a dictionary, and we’ll use it to look up information about Olympic athletes. You’ll search how many medals an athlete won overall the competitions. There are two stages in this project. In each stage you will code a dictionary in the C programming language. A binary search tree will be the underlying data structure for both stages In this assignment the search keys are not guaranteed to be unique. In this assignment we use variants of the binary search tree designed to handle duplicates, i.e. by either dividing nodes using <- >, or by using < > and a linked list for items with same key. You will use a Makefile to direct the compilation of two separate executable programs, one for Stage 1 and one for Stage 2, each of which uses a different variant of the binary search tree In both stages of the assignment, you will insert records into the dictionary from a file. You will then look up and output the records (data) contained by the dictionary, counting and outputting the num- ber of key comparisons used in the search. Show transcribed image text

Expert Answer


Answer to Example Input Csv File 1 Dijiang M 24 180 80 China Chn 1992 Summer 1992 Summer Barcelona B Q30764586 . . .

OR