Find Jobs
Hire Freelancers

PHYTHON ASSSINGMENTS

$10-30 USD

Κλειστή
Αναρτήθηκε περίπου 5 χρόνια πριν

$10-30 USD

Πληρωμή κατά την παράδοση
ntroduction Prepare written answers to, and be prepared to discuss each of the following questions, each of which is taken from, is an extension of, or is inspired by the correspondingly numbered exercise question from the Computational Thinking for the Modern Problem Solver text. Chapter 7: Consider the depiction of a “chunk of memory" given to the left. Exercise Question 2. Consider the following data that describes the “adjacency” of the states in the Northeast. Two states are considered adjacent if they share a common border. CT: NY, MA, RI DE: MD, PA, NJ MA: RI, CT, NY, NH, VT MD: VA, WV, PA, DE ME: NH NH: VT, ME, MA NJ: DE, PA, NY NY: NJ, PA, VT, MA, CT PA: NY, NJ, DE, MD RI: CT, MA VT: NY, NH, MA For example, note that Pennsylvania is adjacent to New York, New Jersey, Delaware and Maryland. Pennsylvania is also adjacent to Ohio and West Virginia, but these facts are not represented in this data. First, depict this data as a graph drawing consisting of nodes (one for each state, and labeled with the state abbreviation) and arcs that represent the adjacencies reflected in the data. Second, complete the depiction of the “chunk of memory” showing how this graph could be represented and stored using the “linking scheme” presented in Chapter 7. Although there are multiple correct answers to this part of the question, for the sake of having some continuity you are to anchor the graph at address 125 using the node for PA. Exercise Question 2a. Note that a complete set of data, showing the adjacencies of all of the states in the union plus the District of Columbia, may be found online at [login to view URL] For this question, you are to analyze the storage needs for this complete set of data (using the linking scheme) and determine the precise total number of memory cells needed to represent it. Additional Questions: Since a tree is a graph that has certain properties (i.e. a tree is a connected acyclic graph), it is the case that trees can then be readily represented the same way as graphs. An interesting and important special type of tree, known as a binary tree, is one in which no node has more than two children. Although a binary tree may be represented the same way as a tree (and thus also the same way as a graph), the specializations present in binary trees may be exploited to gain some efficiency. Consider the following depiction of a chunk of memory and the corresponding binary tree it represents. Here a different representation scheme that uses “indexing” is employed. In the indexing scheme used here the tree’s representation is anchored at memory address 1. In this scheme, the left child of every node is represented in memory at the address of the parent node multiplied by 2, and the right child is represented in the address immediately following the left child. Thus, node B is stored in memory at 1 and its left child, G, is at 2 and its right child E is at 3. Similarly, node F is stored in memory at 5 and its children are represented at 10 and 11 respectively. Note that nodes that do not exist, such as the left child of E and its descendants still consume space in the representation. This indexing scheme that maps the nodes in a rooted binary tree to the positive integers as described above provides a straightforward and reasonably efficient representation for most binary trees. The best case is when the tree is “complete” meaning that every node at every level, except the lowest level, has two children and all nodes at the lowest level are as far left as possible. Of course, binary trees with certain structures may result in inefficient uses of memory. Consider this binary tree.
Ταυτότητα εργασίας: 18767068

Σχετικά με την εργασία

2 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 5 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
2 freelancers δίνουν μια μέση προσφορά $28 USD για αυτή τη δουλειά
Avatar Χρήστη
I have a degree in Computer Science, I can do what you need quickly, just contact me for more details.
$25 USD σε 1 ημέρα
5,0 (1 αξιολόγηση)
1,2
1,2

Σχετικά με τον πελάτη

Σημαία της UNITED STATES
Scranton, United States
0,0
0
Μέλος από Φεβ 19, 2019

Επαλήθευση Πελάτη

Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.