EBK COMPUTER SCIENCE: AN OVERVIEW
12th Edition
ISBN: 8220102744196
Author: BRYLOW
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 9, Problem 51CRP
Explanation of Solution
Modified
The modified algorithm for “MergeFiles” function is given below:
def MergeFiles(InputFileA , InputFileB , OutputFile ):
If (both input files at EOF):
Stop, with OutputFile empty.
If(InputFileA is not at EOF):
Declare its first record to be its current record.
If(InputFileB is not at EOF):
Declare its first record to be its current record.
If (record of InputFileA and record of InputFileB has same key value)
Then Display only one value
Continue until both input files at EOF.
Algorithm Explanation:
- The given code is used to display the only one value in output file if both files contains the same key value records...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
implementation in python
RCS adopts a reverse delta approach for storing multiple versions of a file. For example, assume a file has three
revisions, 1.1, 1.2, and 1.3, RCS stores the file as of version 1.3, then, the differences between 1.2 and 1.3, and
the differences between 1.1 and 1.2. When a new version is created, say 1.4, the difference between 1.3 and 1.4
is computed and stored, and the 1.3 version is deleted and replaced by 1.4.
Explain why RCS does not simply store the initial version (in this case 1.1) and the differences between each
successive version.
1. Given that F is a direct file with n = 2000 records and that the records are stored in orderof their keys. Determine how any record reads it would take to locate a particular record using:a. Sequential search (average case)b. Binary search (worst case)c. (open) hashing with 200 buckets (average case)d. (open) hashing with 400 buckets (average case)
2. Write the declarations to create a data type called: DICTIONARY that represents an openhashing scheme with 20 buckets
Chapter 9 Solutions
EBK COMPUTER SCIENCE: AN OVERVIEW
Ch. 9.1 - Identify two departments in a manufacturing plant...Ch. 9.1 - Prob. 2QECh. 9.1 - Summarize the roles of the application software...Ch. 9.2 - Prob. 1QECh. 9.2 - Prob. 2QECh. 9.2 - Prob. 4QECh. 9.2 - Prob. 5QECh. 9.2 - Prob. 6QECh. 9.3 - Prob. 1QECh. 9.3 - What is a persistent object?
Ch. 9.3 - Identify some classes as well as some of their...Ch. 9.3 - Prob. 4QECh. 9.4 - Prob. 1QECh. 9.4 - Prob. 2QECh. 9.4 - Prob. 3QECh. 9.4 - Prob. 4QECh. 9.4 - Prob. 5QECh. 9.4 - Prob. 6QECh. 9.5 - Prob. 1QECh. 9.5 - Prob. 2QECh. 9.5 - Prob. 3QECh. 9.5 - Prob. 4QECh. 9.5 - Prob. 5QECh. 9.5 - Prob. 6QECh. 9.5 - Prob. 7QECh. 9.6 - Prob. 1QECh. 9.6 - Give an additional example of a pattern that might...Ch. 9.6 - Prob. 3QECh. 9.6 - How does data mining differ from traditional...Ch. 9.7 - Prob. 1QECh. 9.7 - Prob. 2QECh. 9.7 - Prob. 3QECh. 9.7 - Prob. 4QECh. 9 - Prob. 1CRPCh. 9 - Prob. 2CRPCh. 9 - Prob. 3CRPCh. 9 - Prob. 4CRPCh. 9 - Prob. 5CRPCh. 9 - Prob. 6CRPCh. 9 - Prob. 7CRPCh. 9 - Prob. 8CRPCh. 9 - Prob. 9CRPCh. 9 - Prob. 10CRPCh. 9 - Prob. 11CRPCh. 9 - Prob. 12CRPCh. 9 - Using the commands SELECT, PROJECT, and JOIN,...Ch. 9 - Answer Problem 13 using SQL. PROBLEM 13 13. Using...Ch. 9 - Prob. 15CRPCh. 9 - Prob. 16CRPCh. 9 - Prob. 17CRPCh. 9 - Prob. 18CRPCh. 9 - Prob. 19CRPCh. 9 - Empl Id Name Address SSN Job Id Job Title Skill...Ch. 9 - Empl Id Name Address SSN Job Id Job Title Skill...Ch. 9 - Prob. 22CRPCh. 9 - Prob. 23CRPCh. 9 - Prob. 24CRPCh. 9 - Prob. 25CRPCh. 9 - Write a sequence of instructions (using the...Ch. 9 - Prob. 27CRPCh. 9 - Prob. 28CRPCh. 9 - Prob. 29CRPCh. 9 - Prob. 30CRPCh. 9 - Prob. 31CRPCh. 9 - Prob. 32CRPCh. 9 - Prob. 33CRPCh. 9 - Prob. 34CRPCh. 9 - Prob. 35CRPCh. 9 - Prob. 36CRPCh. 9 - Prob. 37CRPCh. 9 - Prob. 38CRPCh. 9 - Prob. 39CRPCh. 9 - Prob. 40CRPCh. 9 - Prob. 41CRPCh. 9 - Prob. 42CRPCh. 9 - Prob. 43CRPCh. 9 - Prob. 44CRPCh. 9 - Prob. 45CRPCh. 9 - Prob. 46CRPCh. 9 - Prob. 47CRPCh. 9 - Prob. 48CRPCh. 9 - Prob. 49CRPCh. 9 - Prob. 50CRPCh. 9 - Prob. 51CRPCh. 9 - Prob. 52CRPCh. 9 - Prob. 53CRPCh. 9 - Prob. 54CRPCh. 9 - Prob. 55CRPCh. 9 - Prob. 56CRPCh. 9 - Prob. 57CRPCh. 9 - Prob. 58CRPCh. 9 - Prob. 59CRPCh. 9 - Prob. 60CRPCh. 9 - Prob. 61CRPCh. 9 - Prob. 62CRPCh. 9 - Prob. 1SICh. 9 - Prob. 2SICh. 9 - Prob. 3SICh. 9 - Prob. 4SICh. 9 - Prob. 5SICh. 9 - Prob. 6SICh. 9 - Prob. 7SICh. 9 - Prob. 8SICh. 9 - Prob. 9SICh. 9 - Prob. 10SI
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- In this exercise you will design and implement a simple encryption program that can either encrypt or decrypt a string of text by following the steps below. Create a dictionary dict that maps each (lower case) character of the basic Latin alphabet to another. Make sure no one letter is mapped to itself. Do not use a simple ordering, such as reversing the alphabet. This will act as your cipher. Your program should be able to ask user for a text and encrypt it. Your program will take each character in the string and swap it with the corresponding character from the cipher, print the encrypted text. Your program should be able to decrypt encrypted text as well. It should perform the opposite operation as the encrypt does. Print the decrypted text. Create a loop that asks if the user would like to encrypt some text, decrypt some cipher text, or exit the program. Perform the operation the user selects, printing the computed text if applicable.arrow_forwardSuppose that a shopkeeper decided that customers who come first will be served first. A list of customers must be maintained so that anyone can be accessed randomly. Your program must remember operations performed in the opposite order. The entries should be managed based on the order of arrival and also be deleted when no longer needed. The size of a file is unknown. A list must be maintained so that elements can be added to the beginning or end in O (1).Based on the above scenario you have a list of different data structures, choose appropriate among them and implement using java. It is important that the structure has flexible memory management.arrow_forwardNeed another function written in python from the csv linkarrow_forward
- Implement a blog server in C 1. Implement get of all posts (GET /posts), and individual post (GET /post/1) 2. Implement creation of post (POST /posts). Allow the user to enter their name, but check that they are a valid user in db. Do error checking! The user should not specify the post id; that should come from the database. 3. Write three html files to test this; serve them with the blog server: index.html shows the list of posts with a link to each. post.html shows a post. publish.html allows the creation of a new post. Link these together as a user would expect!arrow_forwardWe have a text data file with 9 records. Each record has a name, a m i d t e r m score, and a f i n a l e x a m score. The items in each row are tab-separated. The first couple of rows look like this. But, as we said, the data file contains 9 records total. adams 98 86 baker 92 85 carrol 59 89 ... ... ... and so on... The data file you will need is given in this link: cit101.txt (https://bit.ly/3LCQWfD) Clicking the link probably opens the file in your browser; save it somewhere where you can find it. The name should remain cit101.txt. When I test your program it should be able to read my data file, and it will if your data file is named cit101.txt. There are example programs similar to this assignment given in the lecture notes discussing dictionaries. Use the python CSV module's csv.DictReader() approach to read the data from the file. Read the tab-separated file into a list of dictionaries when opening the file for reading, and use that list of dictionaries as the program…arrow_forwardAssume you have a folders of (images and videos) in your computer which contain some random mix numerical values. Your task is to separate images (e.g odd values) and videos (e.g Even values). So that all the images and videos are stored in separate folders (lists). While separating make sure that any of the folder (lists) should not contain any duplicate file or duplicate value. In this task images and videos odd & even numbers and folder means a single list of mix value. e.g: linkedlists (odd, even). Design a method for above task which will create two separate linked lists and write main method to test your program. FOLDER (VIDEO AND IMAGES:ODD AND EVEN VALUES) LIST 0: [2, 44 , 24 , 82 , 33 , 44 , 55 , 11 , 2 , 44 , 55]: EVEN VALUES_LIST 1: [2, 44 , 24 , 82]: A=2, B=44, C=24, D=82 ODD VALUES:_LIST 2: [33 , 44 , 55 , 11]: A=33, B=45, C=55, D=11arrow_forward
- I need help creating a Java program that is described in the given image and description below: The attached text file contains record information from records with the following field format:first name,middle name,last name,city nameThe data was badly stored, using the Comma Separated Value (CSV) format, in such a way that the fields do not properly align with that record format. All of the information is there but the record boundaries are mis-aligned. Some, all, or more than a single proper record may exist in as a single record in this file.Example:LarsJame,Thompson,Clifton,JeniferMae,Jones,HenryRick,Luke,SimonsLincoln,Tim,Lee,Huag,BostonSally,Joe,Patton,New YorkHoward,Richard,Larson,Scramento,Samantha,Austin,Henry,St George,GeorgeHenry,Marcus,New Town Your task is to write a program that will read the data from bad files and write new files with the data correctly stored in a new CSV format and in alphabetical order by last name, first name, middle name. The new format is:last…arrow_forwardThis two-part lab deals with reading numerical data from a binary file named NBdata.bin. The main reason for using binary rather than text files is that they require less memory and are much faster. The program will read the integer data in binary form and calculate two related quantities: the odd geometric, and the even harmonic means. Important: (1) Although the text file is much longer, the program will only read a fixed number of records, N to provide variability for testing purposes. (2) It may be easier to read all N elements from the file and store them into an integer array since the program will need to access them later. (3) The file will contain only positive integers. (4) Prompt the user for this fixed number of elements N to read from the file. This number will be between 3 and 100. (Your program does not need to check the input). Use the format below. Enter N: [...] Part I: Open the binary file named NBdata.bin for readig. The file is stored internally. Prompt the user…arrow_forwardWrite a program that expands on the program below (i.e. reading data of each record in the file and storing it into data structure). The expansion involves writing all records to a file (use fprintf, call the name of the file csv). The displayed data must be accessed (and thus written) from data structure (i.e. array of structs). The format written to the file should be one line per record, with each field separated by a comma (‘,’) program should then output the number of lines in the file.test the program by creating a text file with at least 10 lines of text (of any composition). Use notepad++ to create the data file. #include<stdio.h>#include<stdlib.h> //Structurestruct Person{ char name[10];int age;float wage; }; //Main int main (int argc, char **argv) { FILE* f; if (argc != 2) { printf("No filename in the argument"); return 1; } f = fopen(argv[1], "r"); if (f == NULL) { printf("The file cannot be opened successfully:…arrow_forward
- Q2arrow_forwardTask 5 Write a Python program to combine each line from the first file with the corresponding line in the second file and then save it in a 3rd file. Consider, both the files have same number of lines. Assume, each line has a newline(\n) at the end. Example: Input from file 1: Hello Hi Nice Input from file 2: Bad Worse Worst Output in 3rd Flle: Hello Bad Hi Worse Nice Worst Hint(1): Use the write( functionarrow_forwardComputer Science Write a python program that reads the data file https://archive.ics.uci.edu/ml/machine-learning-databases/eventdetection/CalIt2.data and finds the total count of outflow and the total count of inflow. The attributes in the file are as follows: 1. Flow ID: 7 is out flow, 9 is in flow 2. Date: MM/DD/YY 3. Time: HH:MM:SS 4. Count: Number of counts reported for the previous half hour Rows: Each half hour time slice is represented by 2 rows: one row for the out flow during that time period (ID=7) and one row for the in flow during that time period (ID=9) Hint: # Importing the dataset dataset = pd.read_csv('CalIt2.data') https://archive.ics.uci.edu/ml/machine-learning-databases/event-detection/CalIt2.data this link should work.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education