Essay on Gray Code

In: Computers and Technology

Submitted By cartney
Words 797
Pages 4
Artificial Intelligence – Depth First Search(DFS)
November 13, 2012 · by Siddharth Agrawal · in Artificial Intelligence
Okay! So this is my first blog post!
I will start by talking about the most basic solution to search problems, which are an integral part of artificial intelligence.
What the hell are search problems?
In simple language, search problems consist of a graph, a starting node and a goal(also a node). Our aim while solving a search problem is to get a path from the starting node to the goal.
Consider the diagram below, we want to get to the node G starting from the node S.

Which path will we get on solving the search problem? How do we get the path? This is where algorithms come into picture and answer all our questions! We will look at Depth First Search which can be seen as a brute force method of solving a search problem.
Creating the search tree
So how do we simplify this problem? If we reduce the graph structure to a tree(not particularly a binary tree!), the problem would be to find a node with a particular value starting from the root.
So the tree would be as follows:
S will be the root of the tree. S will have children A and G. A will have children B and C. B will have only one child D. C will have children D and G. D will have only one child G.
Now you may ask which ‘D’ will have the child G, the one which is the child of B or the one which is a child of C? The answer is both. We want to consider all the possibilities and thus we have to show all the connections uniquely in the tree.
The diagram below shows the created search tree. Note that the nodes are alphabetically taken from left to right. This will be important later!
Also note that all the leaf nodes are G. This is not because G is the goal, but because there are no edges originating from G. Even if your goal was say D, the search tree would have remained the same.
Depth first search…...

Similar Documents

Code

...Pseudocode syntax, descriptions and examples Overview: This table provides a reference for commonly used pseudocode for introductory computer program design courses. You should use this as your reference and copy and paste code examples into your projects to ensure you are using proper syntax. Be sure to indent your code to make it more readable and use modify and enhance from the examples as needed. Also, capitalize the first letter of your pseudocode (e.g. While, not while). Pseudocode Write/Prompt Description Displays messages and other information on the screen Flowchart equivalent Write “What is your name?” Input Pauses execution, allowing the user to enter data Input FirstName Input FirstName Compute/Set Assigns a value to a variable Set Avg=(num1+num2)/2 Declare Example usage Write “What is your name?” Write “Your name is “ +YourName + “.” Prompt for ItemName, Price, Quantity Declares a variable to be of a specific type Input Number1, Number2 Compute average value: Set Avg= (num1 + num2)/2 Compute total cost: Set TotalCost= 1.25*Songs Declare FirstName As String Declare FirstName as String Declare Num1, Num2 As Integer Possible datatypes may include: String 1 Call Requests a module, subprogram, or function be executed Call WriteNums(num1, num2)) If End If Tests if a condition is met. If the test condition is true, the statements are executed. Enter Is Number < 5? Character Integer Float Main Module Write “Enter 2 numbers” Input Num1,Num2 Call......

Words: 712 - Pages: 3

Codes

...ALT Codes - Alt Codes for Maths / Mathematics Welcome to Useful Shortcuts, THE Alt Code resource! If you are already familiar with using alt codes, simply select the alt code category you need from the table below. If you need help using alt codes find and note down the alt code you need then visit our instructions for using alt codes page. List of Alt Codes for entering Mathematical Symbols ALT Codes for Mathematical Symbols | Alt Code | Symbol | Description | Alt 48 - 57 | 0 - 9 | zero to nine | Alt Codes for Basic Operators | Alt Code | Symbol | Description | Alt 43 | + | Plus Sign | Alt 45 | - | Minus Sign | Alt 0215 | × | Multiplication Sign | Alt 0247 | ÷ | Obelus / Division ign | Alt Codes for Pers | Alt Code | Symbol | Description | Alt 37 | % | Percentage Sign | Alt 0137 | ‰ | Per mille (per thousand) | Alt Codes for Bracketing | Alt Code | Symbol | Description | Alt 40 | ( | Open Bracket | Alt 41 | ) | Close Bracked | Alt Codes for Degree of Accuracy | Alt Code | Symbol | Description | Alt 241 | ± | Plus or Minus | Alt Codes for Fractions | Alt Code | Symbol | Description | Alt 47 | / | Fraction seperator | Alt 0188 | ¼ | Quarter | Alt 0189 | ½ | Half | Alt 0190 | ¾ | Three quarters | Alt 46 | . | Decimal Point | Alt Codes for Equality | Alt Code | Symbol | Description | Alt 240 | ≡ | Exactly Identical | Alt 61 | = | Equals ...

Words: 513 - Pages: 3

Ms. Gray

...Christie M. Gray Gray 01 Professor Wilkinson Summer Quarter 2013 24 July 2013 Descriptive Statics Being a former employee with the Secretary of State Driver Services Department, also known as the Driver’s License Facility. There are a number of ways in which the organization displays the use of descriptive statics. According to Lind, “descriptive statistics is defined as methods of organizing, summarizing, and presenting data in an informative way.” The Secretary of State’s office is one of the largest and most diverse offices of its kind. It provides more direct services to Illinois citizens than any other public agency. When an Illinois citizen comes in contact with the state government, it is most often through the Secretary of State’s office. Secretary White’s administration is committed to making the office’s services the most accessible and customer friendly in the nation. The Office of the Secretary of State is visited by more Illinois residents than any other in state government. The Driver Services Department issues licenses to more than 8.5 million drivers and more than 3 million photo identification cards to drivers and non- drivers at more than 130 locations. The office generates approximately $2 billion in annual revenue with about $1.2 billion a year designated for state highway construction funds. The office issues vehicle license plates, titles, and collects taxes for the Department of Revenue on vehicles and......

Words: 487 - Pages: 2

Dorian Gray

...Sparknotes – Dorian Gray • Written by Oscar Wilde in 1890. • Devoted to a school of thought and a mode of sensibility known as aestheticism, Wilde believed that art possesses an intrinsic value—that it is beautiful and therefore has worth, and thus needs serve no other purpose, be it moral or political. • Dorian is a cultured, wealthy, and impossibly beautiful young man who immediately captures Basil’s artistic imagination • Although Lord Henry is a self-proclaimed hedonist who advocates the equal pursuit of both moral and immoral experience, he lives a rather staid life. • The Victorians believed that art could be used as a tool for social education and moral enlightenment, as illustrated in works by writers such as Charles Dickens and George Gissing. The aestheticism movement, of which Wilde was a major proponent, sought to free art from this responsibility. • “We are punished for our refusals. Every impulse that we strive to strangle broods in the mind, and poisons us.” • The Picture of Dorian Gray has often been compared to the famous German legend of Faust. The legend tells of a learned doctor who sells his soul to the devil in return for knowledge and magical abilities. Although Dorian Gray never contracts with the devil, his sacrifice is similar: he trades his soul for the luxury of eternal youth. • He is the last Lord Kelso's grandson. His mother was a Devereux, Lady Margaret Devereaux. Poor chap was killed in a duel at Spa a few months after the marriage.......

Words: 3258 - Pages: 14

The Picture of Dorian Gray

...From the Writer “Dorian Gray the Escape Artist” is the culmination of my work in my WR100 seminar, Fantasy at the Fin-de-Siècle. The final assignment was to create a research paper based on an interesting problem or paradox I had found in Oscar Wilde’s book, The Picture of Dorian Gray. For me, one of the book’s most fascinating elements was Dorian’s immature behavior; though he grows older, he never seems to “grow up.” At first, I investigated how my idea related to aestheticism and what Dorian’s immaturity showed about aestheticism; however, I could not find a solid way to prove my thesis. My greatest problem was being unsure of how writing a paper based on a research problem in The Picture of Dorian Gray constituted a researchable argument and not just a literary analysis. Hoping to gain a different perspective on the assignment, I met with fellow classmates to talk out my problem. It turned out that they were having the same issue with their essays, and through discussing my paper with them, I realized that my topic was too narrow to be easily supported by sources; the idea of Dorian growing older without growing up was interesting but could not easily be supported with sources outside the novel itself. With this in mind, I modified my thesis, claiming that though Dorian Gray demonstrates aesthetic behavior in The Picture of Dorian Gray, his fascination with artistic things serves less to pursue aestheticism and more to evade his dark past. In this manner, I argued,...

Words: 2321 - Pages: 10

Fifty Shades of Gray

...yet here I am trying to brush my hair into submission. I must not sleep with it wet. I must not sleep with it wet. Reciting this mantra several times, I attempt, once more, to bring it under control with the brush. I roll my eyes in exasperation and gaze at the pale, brown-haired girl with blue eyes too big for her face staring back at me, and give up. My only option is to restrain my wayward hair in a ponytail and hope that I look semi presentable. Kate is my roommate, and she has chosen today of all days to succumb to the flu. Therefore, she cannot attend the interview she’d arranged to do, with some mega-industrialist tycoon I’ve never heard of, for the student newspaper. So I have been volunteered. I have final exams to cram for, one essay to finish, and I’m supposed to be working this afternoon, but no – today I have to drive a hundred and sixty-five miles to downtown Seattle in order to meet the enigmatic CEO of Grey Enterprises Holdings Inc. As an exceptional entrepreneur and major benefactor of our University, his time is extraordinarily precious – much more precious than mine – but he has granted Kate an interview. A real coup, she tells me. Damn her extra-curricular activities. Kate is huddled on the couch in the living room. “Ana, I’m sorry. It took me nine months to get this interview. It will take another six to reschedule, and we’ll both have graduated by then. As the editor, I can’t blow this off. Please,” Kate begs me in her rasping, sore throat voice. How......

Words: 151445 - Pages: 606

Dorian Gray Character Analysis

...Dorian Gray character analysis Dorian Gray is so many opposites at once that we can’t really understand them all. He’s good, he’s bad; he’s beautiful, he’s hideous; he’s perfect, he’s terribly flawed. Most importantly, he is literary two things at one – he’s himself, a living, a breathing human being, and he’s also the portrait, a visible reflection of the state of his soul. Dorian Gray within the novel At the opening of the novel, Dorian Gray exists as something of an ideal: he is the archetype of male youth and beauty. As such, he captures the imagination of Basil Hallward, a painter, and Lord Henry Wotton, a nobleman who imagines fashioning Dorian into a pleasure-seeker. Dorian is exceptionally vain and becomes convinced, in the course of a brief conversation with Lord Henry, that his most salient characteristics—his youth and physical attractiveness—are ever growing. The thought of waking one day without these attributes sends Dorian into a tailspin: he curses his fate and pledges his soul if only he could live without bearing the physical burdens of aging and sinning. He longs to be as youthful and lovely as the masterpiece that Basil has painted of him, and he wishes that the portrait could age in his stead. His vulnerability and insecurity in these moments make him excellent clay for Lord Henry’s willing hands. Dorian soon leaves Basil’s studio for Lord Henry’s parlor, where he adopts the tenets of “the new Hedonism” and resolves to live his life as a......

Words: 542 - Pages: 3

Gray

...Alasdair Gray depicts one simple theme in his piece with rather compact yet symbolic usage of words. The narrator, is looking at Duncan, Marjory, and Thaw as if one knows every moment within the novel. (third person omniscient) By observing specific moments of the characters, narrator indirectly implies the theme: we can overcome with emotion and be deceived. (over flow of emotion) (missing a topic sentence) In the first part, Gray portrays a mysterious atmosphere with ‘semi-duck’ church, where the story is fundamentally taking place. The ‘semi-dusk’ exemplifies the untouched and mysterious air that symbolizes the loneliness of Duncan rather than symbolizing an artisan. Nevertheless, Lenzie is the opposite place of happiness and delight. This is due to the fact that Lenzie is the place where Marjory and Thaw starts their life while Duncan is becoming miserable in the place of agony and reflection, the church. Moreover, the gallery is where the agony gets intensified, narrator describing Duncan more sympathetically, mentions the mirror as the medium that embodies the deception caused by heightened emotion, ensuring the theme once again. As previously stated, Duncan, Marjory, and Thaw foreseeing different futures, the narrator emphasizes that what we look may differ according to circumstances. More precisely, the way that Duncan sees the mural reflected on the mirror as rather weird and strange. ‘Not beauty’ best represents the way he depicts the mural. This can be deduced......

Words: 791 - Pages: 4

Essay Comparing the Talent Code & Steal Like an Artist

...Katie 10/10/2014 Every once in a while you hear a story, watch a movie, or read a book that can change your life. Recently I read two books, “The Talent Code” by Daniel Coyle and “Steal like an Artist” by Austin Kleon. Both of these books are considered self improvement books and are meant to motivate the reader to reach for their greatest potential. However, the two books differ in their writing style as well as, advise on obtaining one’s greatest potential. For instance, “The talent code” was written in a more formal manner with a lot of scientific facts to back up the author’s suggestions on how to improve your skills to reach greatness. On the other hand, “How to steal like an artist” was written in an informal style and used unconventional ways to present information or, advise on reaching greatness. Although the two books had very different writing styles I was motivated by both authors to work harder to reach my greatest potential. These books have had positive implications on both my study skills and volleyball training. The first book I read “The Talent Code” looked at research and scientific evidence to explain why certain people or groups develop extreme greatness in a particular area, which Coyle called “hot beds”. Coyle spent years investigating top athletes, artist, as well as meeting with neuroscientist to explain the “hot bed” phenomena. Colye discovered three main objectives that the “hot beds” had in common. The first is deep practice,...

Words: 1095 - Pages: 5

The Death of Freddie Gray

...Ethical Dilemma Week 8 The Death of Freddie Gray By Hope Schwegler May 4, 2015 Phil 2003 Principles of Ethics Professor Margaret De Alminana ‘On April 12, 2015, Freddie Gray, a 25 year old African American male, was arrested by the Baltimore Police Department. He had a known unethical character and had been involved in twenty criminal court cases, five of which were still active at the time of his death. He was due in court on a possession charge on April 24, 2015. Freddie Gray died on April 19, 2015, due to injuries to his spinal cord. On April 21, 2015, pending an investigation of incident, six Baltimore police officers were temporarily suspended with pay. On May 1, 2015, state prosecutors in Baltimore received a medical examiner’s report ruling Gray’s death as a homicide. Was it foul play that was intentional, gross negligence, or inflicted self harm by the prisoner? We identified “Rae’s first step in making a moral decision is to gather the facts.” Much of the other information had conflicting reports and statements. So what are the “ethical issues that Rae has for level two” in the model for making moral decisions? The formal charge filed by Office Garrett Miller accused Gray of violating statute 19 59 22, “unlawfully carry, possess, and sell a knife commonly called a switch blade knife, with an automatic spring or other device for opening and/or closing the blade within the limits of Baltimore City.” The prosecutor alleged that Gray’s arrest was......

Words: 5828 - Pages: 24

Gray Code

...What is Gray code? From Wikipedia The reflected binary code, also known as Gray code after Frank Gray, is a binary numeral system where two successive values differ in only one bit. The reflected binary code was originally designed to prevent spurious output from electromechanical switches. Today, Gray codes are widely used to facilitate error correction in digital communications such as digital terrestrial television and some cable TV systems. One good way to explain the use of Gray code is to take a look at how a hard drive work, in extreme simplicity. A hard drive contains a disc where information is stored. The information on the disc is stored in ones and zero´s, binaries. The disc is divided into sections which each has a binary signature. Here is a picture to explain: As we can see here, section 0 for example has the binary signature 0000 and section 15 has the binary signature 1111. When a hard drive is running it reads section by section and if the hard drive for some reason has a failure and the reader jumps from section 15 to section 0 the reading changes from 0000 to 1111 which means that every bit read is faulty. This could change alot depending on how the information is parsed. A hard drive could be exposed to a lot of external forces and the reader can jump and missread at any time. This cannot be forseen, but it can be prevented to some extent. Enter Gray code. Gray code is a way to sort the binaries so that one binary......

Words: 1010 - Pages: 5

Solution to Roger Gray

...Solution to Roger Gray ANALYSIS This is a very familiar problem to many purchasers and plant materials managers: incorrect and late information leading to poor supply performance. A common response is to blame the information system, and ask the IT group to fix it or design a new one. Others prefer to point to inaccurate records because those who use the system fail to record their transactions properly. Successful organizations find ways of dealing with these problems, as must Roger Gray. The problems experienced by Roger Gray are typical of MRP- and MRPII-type systems. These systems provide the benefits of planning what to order and produce and when, which helps to keep costs down by minimizing inventories and avoiding unnecessary set-ups. The difficulty is that they require accurate data. Using data that is not accurate or is outdated leads to bad decisions. The case also suggests that factors other than the materials management system were contributing to the problems. Therefore, focusing on IT issues alone will not adequately address the problems. An important factor here is the high cost of a stockout. Failure to meet delivery requirements would result in customer downtime, which carries tremendous costs, particularly for Anderson’s automotive customers. Automotive OEMs charge their suppliers $300,000 to $400,000 per hour of downtime. Consequently, control over inventories is essential. Perhaps the fact that delivery reliability is important is one......

Words: 1008 - Pages: 5

Code

...States by corporations, institutions, and other organizations. For more information, please contact the Special Markets Department at the Perseus Books Group, 11 Cambridge Center, Cambridge MA 02142, or call (617) 252-5298, (800) 255-1514 or e-mail special.markets@perseusbooks.com. CIP catalog record for this book is available from the Library of Congress. ISBN-10: 0–465–03914–6 ISBN-13: 978–0–465–03914–2 06 07 08 09 / 10 9 8 7 6 5 4 3 2 1 Code version 1.0 FOR CHARLIE NESSON, WHOSE EVERY IDEA SEEMS CRAZY FOR ABOUT A YEAR. Code version 2.0 TO WIKIPEDIA, THE ONE SURPRISE THAT TEACHES MORE THAN EVERYTHING HERE. C O N T E N T S Preface to the Second Edition Preface to the First Edition Chapter 1. Code Is Law Chapter 2. Four Puzzles from Cyberspace PART I: “REGULABILITY” ix xiii 1 9 Chapter 3. Is-Ism: Is the Way It Is the Way It Must Be? Chapter 4. Architectures of Control Chapter 5. Regulating Code PART II: REGULATION BY CODE 31 38 61 Chapter 6. Cyberspaces Chapter 7. What Things Regulate Chapter 8. The Limits in Open Code PART III: LATENT AMBIGUITIES 83 120 138 Chapter 9. Translation Chapter 10. Intellectual Property Chapter 11. Privacy Chapter 12. Free Speech Chapter 13. Interlude PART IV: COMPETING SOVEREIGNS 157 169 200 233 276 Chapter 14. Sovereignty Chapter 15. Competition Among Sovereigns 281 294 PART V: RESPONSES Chapter 16. The Problems We Face Chapter 17. Responses Chapter 18. What Declan Doesn’t Get Appendix Notes......

Words: 190498 - Pages: 762

Stephen Gray, Cpa

...Case7.2:Stephen Gray, CPA Answer for Q1 Ethical codes create a boundary that members of a profession could act in to the professions highest beliefs. Where code of ethics is not enforced, a profession’s name could be tarnished by the wrong acts of some individuals that would affect all members of the profession and as the consequence the general public will also be affected. The main reason for the change of these codes overtime is the change in the culture or values systems and attitudes of the general public that pose a need for adjustment with change. The other reason is that the development or the growth of the profession some times faces challenges that require additional code or change of the previous one. Answer for Q2 Yes. Because the Mississippi state board of public accountancy dropped its ban on commissions at almost the same time with the court rulings of Stephen Gray case. The court ruling maintained the state board’s revocation of Stephen Gray's CPA license. However, the Mississippi state board of public accountancy chose not to revoke Gray’s CPA certificate, which was a wise and an appropriate decision to make. If the board revokes his license based on the ruling it would have been a public embarrassment for the board for acting upon a disregarded code of conduct. Answer for Q4 The AICPA is a national organization formed by CPAs in the public accounting profession. It plays a significant role in the standard-setting processes of the profession,......

Words: 340 - Pages: 2

The Gray Zone

...ships inside the Lager. In describing the gray zone, Levi discusses the different roles of prisoners assigned by the Nazi. The prisoners that did the work were seen as being more privileged which at the end of the day helped them get more food and live better. Therefore, the concept of the gray zone is analyzing the difference between the privileged and the non-privileged in the Lager. The difference can be seen by the tasks that the prisoners carried out, for example, one of the groups were seen as, “Low ranking functionaries... sweepers, kettle washers, night watchmen, bed smoothers... checkers of lice and scabies, messengers, interpreters, assistants’ assistants. In general, these people poor devils like ourselves, who worked full time like everyone else but who for an extra half liter of soup were willing to carry out these and other ‘tertiary’ functions.” This group was seen as harmless and not much different than the underprivileged. The other group of prisoners in the Lager was seen as the enemies to their own people. They were referred to as the Kapos who were “free to commit the worst atrocities on their subject as punishment for any transgressions, or even without any motive whatsoever: until the end of 1943 it was not unusual for a prisoner to be beaten to death by a Kapo without the latter having to fear any sanctions.” The prisoners that became part of the Kapo were seen as permanent. They were not accepted back by their people if they were willing to......

Words: 315 - Pages: 2

Aesthetics and Inner Beauty - 310 Words | Ares - Der letzte seiner Art (2016) | Grund Jacken