Computers Without Memory - Computerphile

  Переглядів 333,680

Computerphile

Computerphile

День тому

They're called 'Finite State Automata" and occupy the centre of Chomsky's Hierarchy - Professor Brailsford explains the ultimate single purpose computer.
Note: Professor Brailsford omitted the transition from the 5 state to 25 state by means of a 20p, he has amended the linked notes!
Chomsky's Hierarchy: • Chomsky Hierarchy - Co...
$5 Computer - Raspberry Pi Zero: • Raspberry Pi Zero - th...
Why Computers Use Binary: • Why Use Binary? - Comp...
Steve Furber on ARM: • ARM Processor - Sowing...
CPU vs GPU: • CPU vs GPU (What's the...
Professor Brailsford's Notes: bit.ly/computerphile_Chomsky
Professor Brailsford's t-shirt kindly supplied by Peleg Bar Sapir
/ computerphile
/ computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

КОМЕНТАРІ: 464
@portaadonai
@portaadonai 8 років тому
That guy was born to teach. He loves it, he has a nice slow rhythm in speaking, and enunciates the words at just the right time
@mikestoneadfjgs
@mikestoneadfjgs 8 років тому
I love how in one video he said "if someone wants to make a shirt with this equation on it, i would wear it" and now he is wearing the shirt with the equation on it XD
@noahwilliams8996
@noahwilliams8996 8 років тому
+Charmonium Pentaquark I wish I had that shirt. :(
@ais4185
@ais4185 5 років тому
Supplied by Peleg Bar Sapir (see description), apparently
@Rob-wv8qo
@Rob-wv8qo 8 років тому
Am I the only one really annoyed that there isn't a 20p going from 5 to 25? >:(
@BREDCLAN
@BREDCLAN 8 років тому
ikr
@SK_Wizzard
@SK_Wizzard 8 років тому
No your not ...
@geryou8948
@geryou8948 8 років тому
+Robert Smith Ja, da fehlt ein 20er-Bogen von 5 zu 25.
@VeroniaStudios
@VeroniaStudios 8 років тому
+Robert Smith I had this same thought. :-|
@Elbrasch
@Elbrasch 8 років тому
+Robert Smith me too ^^
@jorunessa
@jorunessa Рік тому
7 years later this man, is still, improving students' lives, really thanks
@AmeerFazal
@AmeerFazal 8 років тому
This man really know how to explain stuff :D
@LJdaentertainer
@LJdaentertainer 8 років тому
+Ameer Fazal He's an ancient geek
@0MVR_0
@0MVR_0 8 років тому
He was at the battle of Troy long before SQL injection
@donaldderp1602
@donaldderp1602 8 років тому
+Omar Omokhodion He collaborated with Archimedes, on building the first computer XD
@tscoffey1
@tscoffey1 8 років тому
+Omar Omokhodion Don't you mean "Greek Injection" (via the wooden horse)
@Nozomu564
@Nozomu564 8 років тому
+tscoffey1 Actually it's not an injection because it required installing a Trojan horse.
@boblake2340
@boblake2340 8 років тому
Finite state machines are everywhere, from stand-alone applications, like this vending machine example, down to the internals of processors and other complex logic chips. The only "memory" they need is a register holding the current state. And that "register" can be implemented with multiplexers (in which the next state is dependent on the mux's current state [outputs] combined with inputs from the system being controlled, and pre-programed input values, determined at design time ), or logic gates that compute the next state on the fly.
@tscoffey1
@tscoffey1 8 років тому
+Bob Lake But originally, in older vending machines, etc.- the "state" would just be the current configuration of all of the levers, toggles, et al, that have been changed due to the different types of coins being dropped in.
@0xbaadf00d
@0xbaadf00d 8 років тому
I remember getting onto an elevator, with people in it already. I pressed the button for my floor and the guy already in the elevator said that it's a grandpa-elevator. This left me with a puzzled look on my face. The guy continued, "no memory". Meaning that the elevator would not remember me pressing that button and I'd need to press it again when it next stopped. And this happened in Finland where nobody does smalltalk.
@asdddddaaaaaaaaa
@asdddddaaaaaaaaa 8 років тому
2 hours of parktime for 25p? Is this real?
@rja421
@rja421 8 років тому
+Дмитрий Корьяс Maybe in 1970 lol.
@mipmipmipmipmip
@mipmipmipmipmip 8 років тому
this channel is full of lies and propaganda! :)
@lamkat2088
@lamkat2088 8 років тому
+Дмитрий Корьяс Areas of Nottingham have 2 hours free for most(all?) car parks.
@sugarfrosted2005
@sugarfrosted2005 8 років тому
+Дмитрий Корьяс The number was picked purely because it was small enough to not be long, but still enough to be complicated.
@amreladawy3784
@amreladawy3784 8 років тому
+Дмитрий Корьяс We pay almost 38P for one hour only !!! And sometimes 58 for one hour.
@imveryangryitsnotbutter
@imveryangryitsnotbutter 8 років тому
It would be so simple to make a machine that handles overpaying. Just add 3 extra states: 30, 35, 40. - If 30, it dispenses a 5p coin if available, and moves to the 25 state. - If 35, it checks the weight of the 10p coins storage. Not empty? Dispense 10p and move to the 25 state. Empty? Dispense 5p if available and move to the 30 state. - If 40, it dispenses a 5p coin if available, and moves to the 35 state. This way, it refunds exact change if possible; otherwise, it refunds as much as it can without going over.
@FortuneRayzor
@FortuneRayzor 8 років тому
+I'm Very Angry It's Not Butter You're thinking too much about the actual implementation and that's not really the point here. You would just add those states to the diagram and named the transitions like -5, -10. The fact that the machine is unable to return 10p coin is irrelevant in this case.
@3snoW_
@3snoW_ 8 років тому
+I'm Very Angry It's Not Butter Simple and effective. Nice one!
@TribeWars1
@TribeWars1 8 років тому
Actually you don't even need the 25 state. You can make the output not only depend on the state but also on the input. If the state is 20 and you add 10p, just add logic that says 20 and 10p - - > print ticket, return 5p, state 0
@sonotthere
@sonotthere 8 років тому
+TribeWars1 but it doesn't know the previous state. unless you mean it checks the state and value of the coin coming in.
@imveryangryitsnotbutter
@imveryangryitsnotbutter 8 років тому
***** I don't think the machine requires any memory to know what coins are available to dispense. Separating the coins does not require a computer; it can be done entirely mechanically. Vending machines have had such non-computerized systems for decades. The machine does not need to keep track of the exact number of coins in each chamber; it just needs to know whether each chamber is "empty" or "not empty". To that end, a non-computerized hanging scale is attached to each chamber. If the chamber is at its default weight (i.e. empty), then the levers within the scale complete a circuit which sends an electric signal indicating that the chamber is empty. However, if the chamber is any heavier than its default weight (i.e. it contains coins), the circuit is broken, and there is no electric signal.
@gnagyusa
@gnagyusa 8 років тому
Having the ability to store a state, *is* memory, whether that state is stored mechanically or electronically.
@dariokartal9453
@dariokartal9453 3 роки тому
You're not saying anything new. He never said that it isn't memory, but rather that devices with this ability don't need (to *have* ) memory (because they *are* memory). TO HAVE != TO BE. Memory doesn't need memory; it's already it. E.g. a simple computer code parser as he described doesn't need a variable to store the parser's state: the parser, just, *is* in some state. A coupla _while_ and _if then else_ arrows is all that such a parser needs to be in this or that state.
@AureliusR
@AureliusR 2 роки тому
@@dariokartal9453 That's... a bit of a stretch.
@RomanSoldier13
@RomanSoldier13 8 років тому
This is actually a really great introduction to automata and formal languages, great examples.
@AvihooI
@AvihooI 8 років тому
The very first component in a compiler is a lexical analyzer which is perhaps a fancy name for an implementation of a finite state automata. It receives a stream of characters (probably encoded in some form to save space and computation time for reasons I cannot immediately explain) and just by moving from one state to another it knows to detect the appropriate token. It also associates a token with a lexeme which is the value of a detected portion of the stream of characters (for example, if the token is a number, then its lexeme might be the value of the number). Those tokens are then parsed by a syntactic analyzer (or parser). The power in lexical analyzers as said in the video is that they don't use any extra memory and they go over their input exactly once (that is to say, the memory complexity of lexical analyzers is O(1) and the time complexity is O(n)). The way they can be implemented is as simple as a two dimensional array that with the indices of it being the characters themselves and a special flag for each input receiving state (unlike conventional FSAs, lexical analyzers can have more than a single type of input receiving state - each type of state corresponding to each type of token). I personally find the simplicity behind them and generally compiler front ends to be incredible. Compilers are made of components, each extremely efficient and incredibly simple for the job it is doing. Yet together they perform a very important and complex task.
@massimilianotron7880
@massimilianotron7880 8 років тому
Could you make a video about how people make programming languages, what kind of software is used to build them, etc?
@tscoffey1
@tscoffey1 8 років тому
+Massimiliano Tron Compiler theory is fairly complicated in general. However, there are tools that are used to generate compilers for simple languages - YACC (Yet Another Compiler-Compiler), and Lex (a tool that generates a lexical analyzer, which is what the professor was describing at the end).
@mandolinic
@mandolinic 8 років тому
+Massimiliano Tron The simplest technique is probably something called Recursive Descent. It only works with certain languages, but you can use it to hand build (without any tools other than a compiler and and editor) a parser for a fairly simple language such as Pascal. You can find lots of information about Recursive Descent on the web. Like all parsers, you need to start with the formal definition of the language, written in a formal language such as EBNF (which you should also be able to find on the web). Where it get really exciting is that EBNF itself is formally defined and pretty simple. So simple that you can easily write a parser for it, which outputs program source code to parse whatever language the EBNF is describing. This is one way that you can make a basic "compiler compiler".
@MsSomeonenew
@MsSomeonenew 8 років тому
+Massimiliano Tron You can use whatever existing language you like, the end result is machine code anyway. And that is what your language must be capable of becoming. Hard part ultimately is making a compiler that can translate reliably and quickly, that is where most if not all homebrew stuff fails.
@HemmligtNavn
@HemmligtNavn 8 років тому
+Massimiliano Tron Send me a private message and if you like I can send you some chapters of a compiler construction book that I am writing ..
@asmallbabby4205
@asmallbabby4205 8 років тому
check out Forth, that's a language that can be implemented from scratch in a month.
@_framedlife
@_framedlife 8 років тому
I can listen to this man and Tom Scott all day and not get bored
@frankharr9466
@frankharr9466 7 років тому
Live British coins! SO much more exciting that the caught and stuffed variety.
@Scott-J
@Scott-J 8 років тому
I always enjoy the videos with Professor Brailsford. This one is no exception. Thanks very much!
@WeeWeeJumbo
@WeeWeeJumbo 8 років тому
Ay ay ay COMBINATORICS. I feel like this guy must be a terrific professor
@1st1anarkissed
@1st1anarkissed 8 років тому
I really enjoyed that. I learned all of that new and some of it wasn't able to sink in, but most of it really tickled the neurons, so thank you!
@kamoroso94
@kamoroso94 8 років тому
Perfect timing! I'm just learning about these in one of my classes.
@aonoymousandy7467
@aonoymousandy7467 5 років тому
Great series, I have learned a lot watching these videos
@jenniferw8963
@jenniferw8963 Рік тому
Thanks much for this video. I used a finite state machine when coding a library for sending SMTP mail back in 1994 -- it for an uncommon programming language. It sure made the coding very easy and you could visualize the code by looking at the graph. The graph was easy to draw because it made sense and the coding was like 15 minutes because I had the Finite State Machine. Thanks for refreshing my memory because I forgot how to even draw a finite state machine after not using htem for so many years :)
@Schindlabua
@Schindlabua 8 років тому
Fun fact: In PHP your variable names can consist of only numbers. $1 = "Hello World"; // Syntax error: Unexpected '1' (T_LNUMBER) yada yada ${1} = "Hello World"; // works just fine Which is funky, since in the PHP docs it explicitly says "A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores". It seems like that rule is only enforced by the parser and can be circumvented easily anyway! PHP is also a big mess though, so stuff like that is to be expected.
@yyny0
@yyny0 8 років тому
So technically you are not using a actual PHP interpreter/compiler/repl/whatever-it-is :D But I've heared people say GCC isn't a C compiler either.
@yyny0
@yyny0 8 років тому
So technically you are not using a actual PHP interpreter/compiler/repl/whatever-it-is :D But I've heard people say GCC isn't a C compiler either.
@yyny0
@yyny0 8 років тому
So technically you are not using a actual PHP interpreter/compiler/repl/whatever-it-is :D But I've heard people say GCC isn't a C compiler either.
@feldinho
@feldinho 8 років тому
+Schindlabua ${"💩"} works to. with that notation, the variables can be anything!
@Schindlabua
@Schindlabua 8 років тому
Felds Liscia Haha, that's amazingly awful. It looks like anything that PHP can coerce to any string works. ${""}, ${[3]}, ${new SplTempFileObject()}, knock yourself out! :D This language never fails to surprise me.
@suave319
@suave319 8 років тому
I love videos with this guy. He's enthusiastic and explains well.
@RussellTeapot
@RussellTeapot 8 років тому
Thank you so much Professor Brailsford, I love this topic... And I have to admit, at least for me you Sir are the best at explaining something! The enthusiasm is intense, it's like a grandfather telling old stories near a campfire..I just love it.
@silenthill8312
@silenthill8312 2 роки тому
Very well explained, thank you
@gothxx
@gothxx 8 років тому
I would so much like to work with finite state machines and epsilon transitions, the graphs are just so beautiful.
@Wanttofanta
@Wanttofanta 8 років тому
I don't know what it is, but there's something i love between the way he describes things and his voice :D
@dreamhollow
@dreamhollow 6 місяців тому
I love this guy. I could listen to him for hours.
@IceMetalPunk
@IceMetalPunk 8 років тому
This brings me back to my Models of Computation course days at uni...and my Foundations of Computer Science course...and my Programming Language Design course...actually, guys, these things are everywhere in computer science XD
@jakejakeboom
@jakejakeboom 8 років тому
embedded systems, hardware VHDL design... even in computer/electrical engineering
@IceMetalPunk
@IceMetalPunk 8 років тому
jakejakeboom Huh. I don't remember discussing FSAs in my embedded systems course...but that was only one semester years ago, so I could have just forgotten XD
@BillySugger1965
@BillySugger1965 8 років тому
+IceMetalPunk in embedded control engineering we just call them state machines. Very simple to define complex behaviour which is fast to implement and easy to get right with predictable behaviour. Gives you a lot of performance with little risk of bugs. And starting with a state diagram like that shown means it's easy to get your head around the function and make changes when needed.
@doid3r4s
@doid3r4s 8 років тому
+IceMetalPunk If i remember correctly, the control unit of a MIPS multicycle is modeled as a state machine.
@yuzan3607
@yuzan3607 3 роки тому
Are they useful for computer scientists? meaning did you use them in your job? It'd be ironic if you've never had to use them, and me an engineer who knows nothing about all of this am back to learning them because I need them in my job.
@pepperoach
@pepperoach 7 років тому
If a parking machine can't handle overpaying, would you call it a parker machine? Oh, wait, wrong channel.
@NoriMori1992
@NoriMori1992 7 років тому
Pedro Paletta It's never the wrong channel. :D
@andredejager3637
@andredejager3637 Рік тому
Every time I watch this I understand more and more. Like 5,5,5,5,5 is one of the acceptable strings/words in the Language of the machine i.e will allow the transition to the end state.
@HenryMcGuinnessGuitar
@HenryMcGuinnessGuitar 3 роки тому
Wonderful, clear explanation
@aleksandersuur9475
@aleksandersuur9475 7 років тому
The great way about finite state machines, or about writing an arbitrary program as a finite state machine, is that if you have defined all the possible states and all the possible transitions the program can never find itself in an unexpected situation. Highly reliable programs can be made by thinking of the processes as finite state machines. The example is simplistic, but any program can be converted to a fsm. You can have any number of states, inputs, outputs, transitions and if you loop an output to input you can call it a variable.
@RonJohn63
@RonJohn63 8 років тому
6:54 COBOL allows for variables starting with a digit. That was very handy before the language got more structured features.
@m0hamedtajelsir
@m0hamedtajelsir 7 років тому
I didn't like the statement that the finite automata is a memory less system. I argue that the retention ability of the system to store the present state is itself a demonstration for the system to have a memory
@snippletrap
@snippletrap 5 років тому
Memoryless is a technical term. It means that the next state only depends on the current state. See “memorylessness” on Wikipedia.
@I_am_Allan
@I_am_Allan 8 років тому
What you spoke about, reminded me a LOT of the IBM PS/2 'terminals' I used in 1995(ish) at school. They had NO HDD's, and very very limited memory ... they were 'token ring' connected to "Enterprise" the schools mainframe. When I'd log in, I was logging into the mainframe, and the actual terminal was ... well like the "slim" terminals of today. My data was 'stored' (much like the cloud) on the mainframe server. IBM was ahead of the time with "slim terminals" and "cloud computing" I guess!!
@noahwilliams8996
@noahwilliams8996 8 років тому
+Allan C-B History sure does repeat itself doesn't it?
@I_am_Allan
@I_am_Allan 8 років тому
Noah Williams Absolutely ! Though ... vending machines were around before IBM's PS/2 LoL
@expansivegymnast1020
@expansivegymnast1020 Рік тому
Awesome video!
@RiscTerilia
@RiscTerilia 7 років тому
Modular synthesisers might be an interesting topic for a future computerphile video since they're actually special purpose analogue computers.
@HemmligtNavn
@HemmligtNavn 8 років тому
If I may add a little correction - in a typical DFA (Deterministic Finite Automaton) for a compiler's scanner module - the 'end of an identifier' is not limited to a ; or a , but more reasonably anything that is NOT allowed to be part of a variable name, so if a variable name consists of a starting letter and a any number of letters or digits (letter (letter | digit)* which read a letter followed by any number of (either a letter or a digit) ) [ this is called the equivalent Regular Expression] [ For each regular expression there exists a DFA and vice versa] then typically the 'end' is denoted by anything NOT a letter or a digit. so you would start in state 0 and to go to state 1 you need to see a letter, if you see anything else you go somewhere else (or error) in state 1 you keep recursing for as long as you see letters or digits and if you ever seen anything that is not a letter or a digit you go to state 2 and accept an identifier (without removing the last character you read as it will be needed in the next invocation of the machine).
@zTheBigFishz
@zTheBigFishz 8 років тому
No memory in principle but every State Machine implementation I've used (Harel State Machines usually) require lots of memory to handle transitions, guards, timers, the states themselves, entry/exit actions, etc. Qt, Rhapsody, QP, Sparx, etc. are all examples of useful state machines imps that require memory. This is the disconnect with the abstract field of CS and the people that actually do this stuff to make useful software.
@TymexComputing
@TymexComputing 8 років тому
Yes, the missing transition from 5 to 25 is the one that caused me a headache but i'll just call it a feature :D The speck in the eye of his neighbor see and log in ones not to notice.
@sasukesarutobi3862
@sasukesarutobi3862 2 роки тому
Vending machines really have been around a long time: the first recorded one was built by Heron of Alexandria, who lived around 10-70 AD, and simply consisted of a machine with a coin slot that would dispense a fixed amount of holy water at a temple.
@asmallbabby4205
@asmallbabby4205 8 років тому
Pretty good dissertation on simplicity.
@Cra0Net
@Cra0Net 8 років тому
Professor Brailsford you are the best!
@KarlFFF
@KarlFFF 8 років тому
5:32 - I think that most machines, even in the early days, use the width of the coins. Think there is a couple of numberphile videos about this working towards solids of constant width.
@dakshays6375
@dakshays6375 4 роки тому
Can I hope for a video on Banker's algorithm for deadlock avoidance while resource allocation by operating system. I know there are lot of videos on this here in UKposts , but I love watching Computerphile videos.
@Space_Parrot
@Space_Parrot 8 років тому
This man was all over the place with his explanations
@marcduperron6062
@marcduperron6062 8 років тому
Finite State Automata = Regular Expressions The base for syntax parsing in programming languages. Alan Turing was a master in that field.
@yuzan3607
@yuzan3607 3 роки тому
I don't know if you're still here (after 5 years), but can you explain exactly how syntax parsing is a finite state automata? I'm interested in that.
@heraldo623
@heraldo623 Місяць тому
​@@yuzan3607they mean a syntax parser can be modelled as a finite state machine. The state machine reads all characters from the syntax input in order. Each character triggers a state transition. If the machine reaches the final state, the syntax is valid, otherwise it's not.
@HackingVision
@HackingVision 7 років тому
Love the T-shirt Prof its awsome :).
@hamed9327
@hamed9327 Рік тому
great great explanation
@AiOinc1
@AiOinc1 8 років тому
Hey, if you're like me and like to write short programs in BATCH (which some could argue is not a programming language but I genuinely don't care), variables have to be surrounded by percent signs (%), meaning you can have any symbol or combination of symbols excluding the percent sign. This also means spaces, leading numbers, you can even name a number 999 should you want to, just by typing %999%. That's why I like using batch.
@kilesengati
@kilesengati 8 років тому
At the time this video was released we started the very same topic in the 12th class informatics course at my school.
@chrisofnottingham
@chrisofnottingham 8 років тому
Just to point out that a state machine like that is itself memory. It knows what state it is in and maintains that state until it gets a new valid input.
@hares295
@hares295 8 років тому
Depends on how you look it, those computers still have a memory, even if mechanical but they know how much money you put in. It does not know how did it get there or how much does it have totally but when the buyer begins putting in coins there is a temporary memory. Its really like a variable actually because a computer does not have to know anything other than numbers are adding up to it and at 25 (as an example) it will do something, then it will reset, regardless of what the result is. The other thing is, because you mentioned vending machines, either way you put it (mechanical or digital) the machine will get the message of what you want and will wait for the proper amount of money and will no what actions to perform so it can give away the following product. I'm probably complicating things but either way its still a form of memory whether or not it can be altered by the user or the device itself. The only thing with these is that this is rather a "mechanical approach"...?
@snippletrap
@snippletrap 5 років тому
The application to practical computer science is not checking variable names specifically. It’s REGULAR EXPRESSIONS in general. Every regular expression corresponds to a deterministic finite automoton.
@tushexable
@tushexable 7 місяців тому
a doubt, just trying to understand, we would still need memory to program the states right, like each state needs memory to know how to transition to a different state, and the transitions themselves would be volatile or temporary memory space which can even be constant, since all it needs to remember is the transition to increment the state, once the new state is reached, the current transition can be deleted or overwritten by new transition. if this is true, then the complexity of FSM specifically DFA should increase with the number of states to reach the final state, it will always be finite, but it is not constant and varies based on the problem, example if the parking ticket price is increased to 50p we would need more states to reach the final state. so we do need memory in the machine right, memory is required for one state to remember how to progress given a transition, and the point where memory is not required is that no state needs a history of how it has been reached, it still would need memory to know how to progress to the immediate next state so the machine should require memory. some of these might be very basic doubts, just want to learn and happy to be corrected :)
@SevenDeMagnus
@SevenDeMagnus 5 років тому
Hi. Where does it store the current sum? Register is a short term memory?
@jucko13
@jucko13 8 років тому
@ 0:43 what is that 'f' doing there in the binairy code? (3rd row from the bottom, in the middle)
@fredderfbobbobbill
@fredderfbobbobbill 8 років тому
25p for 2 hours parking? Pffft.
@szymongorczynski7621
@szymongorczynski7621 8 років тому
On car parks owned by the roads department.
@joseph10097
@joseph10097 8 років тому
+James Gould **Steals your UKposts profile picture**
@amihartz
@amihartz 8 років тому
Are parking meters more common in the UK than in the States? I've only seen one parking meter in my life.
@SproutyPottedPlant
@SproutyPottedPlant 8 років тому
Would an old Otis lift with relay logic and awesome floor selector have memory?
@jaysistar2711
@jaysistar2711 4 роки тому
I haven't seen a Computerphile video on pushdown automata. Do you take requests?
@pedronied
@pedronied 8 років тому
This guy makes paying a machine sound like a jolly walk in the park during an adorable day.
@TanjoGalbi
@TanjoGalbi 6 років тому
Surely the display of the amount entered so far is memory of sorts? It would be temporary memory that once the transaction is complete (I.E. the ticket printed) it gets cleared ready for the next coin to be inserted by the next customer. In programming terms it would be like a temporary variable in a function that is only used while that function is running.
@sebastiannielsen
@sebastiannielsen 8 років тому
In most cases, the parking meters here in sweden, will never reject a overpay. If you overpay, theres 2 possibility things that can happen: Either, it will do as nothing happened, eg it will allow you to pay for as much time as you want. HOWEVER, if you pay for lets say 4 hours on a 2-hour max park, then the person who are checking the parking spaces, will check the "issue time" on the tickets (valid from), and if that is more than 2 hour ago, then you will get a fine for overstaying. The second case with parking meters is that they are programmed with the max-stay time, but then, if you overpay, it will then "swallow" any overpay and then issue a ticket exactly valid for the permitted period. So for example, if a max 2-hour park costs 25 SEK for 2 hours, and you put in 3 pieces of 10 SEK equaling 30 SEK, then it will accept 30 SEK payment and print a ticket valid only for 2 hour. The ticket will instead adjust the price, so on the ticket, it will not say "12,50 SEK per hour" instead it says "15 SEK per hour", so all the number on the ticket match up.
@nexusclarum8000
@nexusclarum8000 7 років тому
Bringing back good memories of when I was in university.
@valhar2000
@valhar2000 8 років тому
I thought this was going to be about a computer I read about once (I can't remember where, or the computer's name) that had several hundred individual CPUs, each one connected to another 16 CPUs, and memory (other than, presumably, the registers in each CPU). The idea, apparently, was that the computer could, at any given time, hold all the information it needed to work with in the CPUs themselves, and had no need for system memory. I was curious to see if I would learn more about how that computer worked, and how successful the design was ultimately deemed to be.
@anirbanc88
@anirbanc88 Рік тому
awesome !
@patricksile
@patricksile 6 років тому
I love when this Sir speaks he breaks it down to the lowest level...
@nargisbanu523
@nargisbanu523 7 років тому
Only 2 days back I wrote that data structure mumbo jumbo for exam without understanding it's practical application. Now I get it! :-|
@DaveScottAggie
@DaveScottAggie 8 років тому
If I remember correctly, traffic light controllers are also finite state machines.
@shreyaskumar3091
@shreyaskumar3091 Рік тому
The language that is taken as an example has one missing transition which is (5,10)-->25
@PantsStatusZero
@PantsStatusZero 8 років тому
128 valid combos?
@billebob
@billebob 8 років тому
Isn't knowing what state the machine is in a type of memory? Or is the definition of memory more restrictive than that?
@MsJavaWolf
@MsJavaWolf 6 років тому
I was wondering the same. I think he didn't mean memory as RAM, but mamory as in recollection how you reached the state.
@emreon.
@emreon. 6 років тому
Memory in this instance refers to a piece of dedicated hardware to hold data like a ram, rom, flash disk, hard drive etc.. Not an abstract concept of remembering a value. The state is stored in a register of the processor / microcontroller.
@toekneema
@toekneema 5 років тому
great communicator
@raykent3211
@raykent3211 8 років тому
for the simple example given here, the fsa approach seems more error-prone in design (he left a path out!) than just keeping a running total of value entered so far, which is childishly obvious. I can see the point for purely mechanical or similar implementation, but if we've got some silicon is there much point in this paradigm?
@glank
@glank 8 років тому
Where do you draw the line between "state" and "memory"? If an FSM can be in two possible states, is that not the same as one bit of memory? If you have a computer with 2GB of memory, is it not the same as an FSM with 2^(8*1024^3*2) possible states?
@jaydeepchauhan959
@jaydeepchauhan959 8 років тому
Can you please also make video on how programming language talk to processor
@CariagaXIII
@CariagaXIII 8 років тому
how about event system vs finate machine
@qyahb3822
@qyahb3822 8 років тому
I think there is mistake here, the vending machine has not temporary hosting, the coin dropa straight to the coin box. Thus register state is not applicable
@andrewkocurek195
@andrewkocurek195 8 років тому
I want to know who eats a -bar- of chewing gum lol.
@Glutnix
@Glutnix 8 років тому
So can we expect a video on Regular Expressions soon?
@talathion369
@talathion369 8 років тому
They made the T-Shirt! Is this the first video where that shows up? Behind on a few episodes...
@DavidKizivat1
@DavidKizivat1 8 років тому
In my language we actually call vending machines "automat" as well as the state machines. When I was telling people that I have exam from automata they instantly assumed I attend a course that's all about vending machines...
@DanDart
@DanDart 3 роки тому
Prof, when in the history of decimal currency did 25p get you 2h parking?
@natrixnatrix
@natrixnatrix 8 років тому
You should do something on lisps.
@TheStevenWhiting
@TheStevenWhiting 8 років тому
We had to make a program in our C++ class that acted like a vending machine. I clearly wasn't that good as it confused the hell out of me. I got help from asking online; once I got pointed in the right direction I finally understood what do to. That was back in 1999. I think this diagram would be helpful.
@xybersurfer
@xybersurfer 7 років тому
i don't think it would have helped. literally implementing the diagram would produce incomprehensible code, that would require this diagram to understand
@tryfinally
@tryfinally 8 років тому
I doubt variable names cannot start with a number for the convenience of the compiler. More likely, the rule is meant to improve code readability.
@Mr_Happy_Face
@Mr_Happy_Face 5 років тому
wont it need memory to store the current number?
@Jackcabbit
@Jackcabbit 8 років тому
The t-shirt, is that part of Graham's number? It would be nice to have a link to the full shirt since Professor Brailsford is wearing a jacket.
@Computerphile
@Computerphile 8 років тому
+Jackalope See the 'why binary' video... >Sean
@FortuneRayzor
@FortuneRayzor 8 років тому
@Stephen Kamenar No it does not. It's an abstract concept and the example used im the video is only for easier explanation. Imagine a tree that has two states: "standing up" and "chopped down", then the transition between those states is simply chopping down the tree and because you can't really undo the transition, the second state is final (something that is a requirement for valid finite-state machine). Baaam, you have an example of finite-state machine that does not imply a memory in any way imaginable.
@spiderman233
@spiderman233 8 років тому
Why can not the programming lang be considered as some kind of memory?, per example: there should be a part that says "if it starts with a letter then its a variable", the lang itself is holding that information. Don't know about vending/parking machines though since i guess they don't use a programming lang.
@TheHereticAnthem20
@TheHereticAnthem20 8 років тому
He found the T-shirt he was looking for!
@Bronimin
@Bronimin 8 років тому
I use the vending machine in the reception of my apartment building for converting my 5p coins into coins that I can use in the washing machines, heh.
@mandolinic
@mandolinic 8 років тому
There are plenty of good applications for a finite state machine - but seriously this money counter isn't one of them! However, he's completely right about the computer language lexer - I've hand programmed several of these and they're great fun.
@andredejager3637
@andredejager3637 Рік тому
Holy crap I think that FSA is incomplete at there is a missing transition from s1 (5p state) to S5 (25p final state) as 5 + 20 = 25
@andredejager3637
@andredejager3637 Рік тому
hahah I just read the header and yes its true ;)
@odioaleman
@odioaleman 8 років тому
K9 most awesome dog ever.
@karlkastor
@karlkastor 8 років тому
+Jaime Cernuda Affirmative!
@AiOinc1
@AiOinc1 8 років тому
+Alex Trusk so did the BBC
@Meep3692
@Meep3692 8 років тому
In Ottawa it's $2.00 for a half hour, but you had to park so far away it takes a half hour of walking to get where you wanted to go anyways.
@AlfaWAR
@AlfaWAR 2 роки тому
Please let me know where I can park for 25p, for 2 hours.
@aminHusseinBossyPumpkins
@aminHusseinBossyPumpkins 8 років тому
Can you please tell me were I can get a bar of gum
The Most Difficult Program to Compute? - Computerphile
14:55
Computerphile
Переглядів 1,3 млн
When Booleans Are Not Enough... State Machines?
21:50
Next Day Video
Переглядів 23 тис.
Повістки у Києві: «Яке право вони мають забирати всіх мужиків?» #війна #мобілізація #військові
00:41
Слідство.Інфо | Розслідування, репортажі, викриття
Переглядів 1,4 млн
ДИНАМО - ВЕРЕС. Пряма трансляція. УПЛ. 5 тур
3:25:01
Гражданская оборона 2024 - 16 полный выпуск
1:04:15
Телеканал ICTV
Переглядів 1 млн
Why Use Binary? - Computerphile
8:29
Computerphile
Переглядів 662 тис.
Why do CPUs Need Caches? - Computerphile
6:06
Computerphile
Переглядів 309 тис.
Optimising Code - Computerphile
19:43
Computerphile
Переглядів 136 тис.
Parsing Explained - Computerphile
14:58
Computerphile
Переглядів 236 тис.
Programming Loops vs Recursion - Computerphile
12:32
Computerphile
Переглядів 1,4 млн
Binary: Plusses & Minuses (Why We Use Two's Complement) - Computerphile
16:16
Rust Data Modelling Without Classes
11:25
No Boilerplate
Переглядів 154 тис.
We should use this amazing mechanism that's inside a grasshopper leg
19:19
Where HTML beats C? - Computerphile
9:48
Computerphile
Переглядів 611 тис.
Повістки у Києві: «Яке право вони мають забирати всіх мужиків?» #війна #мобілізація #військові
00:41
Слідство.Інфо | Розслідування, репортажі, викриття
Переглядів 1,4 млн