Computers and Infallibility

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

Computers and Infallibility

Postby Amtran » Tue Feb 09, 2010 12:29 am UTC

My friend and I were having a discussion, and an interesting question came up. Neither one of us could prove it, but my friend said that computers are infallible. Any error, any miscalculation, are all the programmer's or builder's fault. A computer will never do something wrong, rather it will do something that the programmer told it to do, that was in fact wrong.

Any thoughts?
NOTE: Hardware malfunctions don't count as the computer being wrong.

EDIT: Whoops, meant to put this in the computer science forum. Sorry!
Last edited by Amtran on Tue Feb 09, 2010 2:13 am UTC, edited 1 time in total.
Amtran
 
Posts: 10
Joined: Sun Feb 07, 2010 6:44 am UTC

Re: Computers and Infallibility

Postby MrBlueSky » Tue Feb 09, 2010 12:37 am UTC

If whatever wrong answers come out of the machine are the programmer's fault, then it follows that whatever right answers that come out of the machine are also the programmer's fault.

Computers are just tools. You might as well argue that a hammer is infallible because if it misses the nail it's the carpenter's fault, not the hammer's.
MrBlueSky
 
Posts: 6
Joined: Thu Jan 28, 2010 12:29 am UTC

Re: Computers and Infallibility

Postby oxy » Tue Feb 09, 2010 1:30 am UTC

Rounding errors? But I suppose that the failure to take them into account is a programming error.
User avatar
oxy
 
Posts: 84
Joined: Thu Sep 03, 2009 1:30 am UTC

Re: Computers and Infallibility

Postby qbg » Tue Feb 09, 2010 1:51 am UTC

Do you count cosmic ray bit flips as a hardware malfunction?
qbg
 
Posts: 575
Joined: Tue Dec 18, 2007 3:37 pm UTC

Re: Computers and Infallibility

Postby Amtran » Tue Feb 09, 2010 1:59 am UTC

qbg wrote:Do you count cosmic ray bit flips as a hardware malfunction?

hahahaha

So whenever you get an error, is it always a programming (or hardware) error? Can a computer ever just screw up on its own?
Amtran
 
Posts: 10
Joined: Sun Feb 07, 2010 6:44 am UTC

Re: Computers and Infallibility

Postby thoughtfully » Tue Feb 09, 2010 2:06 am UTC

Looks like those poor cosmic rays have been getting a bad rap!
It's actually alpha emission from materials in the computer. Actually, in the exact chip that is affected, since alphas don't penetrate worth a damn.
Image
If you can't get rid of the skeleton in your closet, you'd best teach it to dance.
-- George Bernard Shaw
User avatar
thoughtfully
 
Posts: 1197
Joined: Thu Nov 01, 2007 12:25 am UTC
Location: Minneapolis, MN

Re: Computers and Infallibility

Postby Area Man » Tue Feb 09, 2010 2:38 am UTC

Amtran wrote:So whenever you get an error, is it always a programming (or hardware) error? Can a computer ever just screw up on its own?

Despite the common terminology, a computer never "decides" anything - it is not sentient, only sends signals (input) through gates to output; the operation rules are rigidly set.
So it's like asking if a piece of copper wire conductor can ever be "wrong", not counting physical damage. It does not have ability to conduct or not conduct at its pleasure.

Indeed, one of the hardest things to do on a computer is generating truly random values.
Bisquick boxes are a dead medium.
User avatar
Area Man
 
Posts: 216
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: Computers and Infallibility

Postby bieber » Tue Feb 09, 2010 3:09 am UTC

In general, no, there's no chance that a computer will randomly do something "wrong." As a poster above mentioned, the laws of physics rigidly govern what goes on inside the machine. It is worth noting, however, that there are more than enough steps where something can go wrong outside of your control that it's easy for incorrect results to appear random. For instance, there could be an issue with the CPU itself (here's looking at you, Pentium), or there could be a bug in your compiler that's causing perfect looking code to execute incorrectly.

Or, on a less sophisticated level, I once had corrupt data keep turning up on a hard disk. I replaced the disk twice before I finally discovered that it was, in fact, faulty RAM that was responsible for the corruption. In the face of factors beyond our control that make things go wrong even when we're certain that we've got everything in order, it's understandable that people would perceive computers as "fallible." Remember, that machine humming away underneath your desk is orders of magnitude more complicated than probably any other piece of equipment you'll work with on a day-to-day basis; getting its pieces to work together flawlessly can be quite a task, and people can and will mess it up at a lot of different stages.
bieber
 
Posts: 193
Joined: Thu Mar 13, 2008 12:13 am UTC

Re: Computers and Infallibility

Postby Berengal » Tue Feb 09, 2010 6:27 am UTC

A CPU might give wrong answers without having a bug, and without hardware failure. Under normal circumstances this can't happen, but if you've ever overclocked your pc you'll know there's a point where your computer starts becoming unstable. You've either turned the clock up too much, causing synchronization to fail and signals to be mixed, or the voltage up too much causing electricity to spill outside its intended paths (or it's become too hot, which brings down the limit on both the clock and voltage). It's not a programmer error, but nor is it a hardware error; the CPU still works as expected without any cracks, breaks or fractures. While it's possible the CPU might be damaged this way it's certainly not guaranteed, and the instability alone is not an indication that it is.

In short, failures may be caused by operational parameters that are outside the spec of the hardware without there being anything wrong with either the hardware or the code itself. Indeed, CPUs aren't all alike, and chips intended to be identical may be sold as different classes because some of them weren't stable enough at the intended settings, but are stable at lower settings.

Area Man wrote:Indeed, one of the hardest things to do on a computer is generating truly random values.
In my experience, user input is indistinguishable from true random values.
Wu
User avatar
Berengal
Superabacus Mystic of the First Rank
 
Posts: 2580
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway

Re: Computers and Infallibility

Postby Indefinity » Tue Feb 09, 2010 6:58 pm UTC

Berengal wrote:
Area Man wrote:Indeed, one of the hardest things to do on a computer is generating truly random values.
In my experience, user input is indistinguishable from true random values.

Code: Select all
// JavaScript random number function that is guaranteed to produce a random number or an angry user, or possibly both
randomInt = function() {
  var x = null;
  while (!x) {
    x = Number(prompt("Enter a random number", 4));
  }
  return x;
}

Well that was easy.

All kidding aside, I like the hammer analogy the best.

And to wander off topic just slightly, we can prove (with a lot of work) that software components can be absolutely correct. I assume that we can prove (with a lot of work) that hardware components are absolutely correct. Given both of these assumptions (and no overclocking), is it possible to create a program that cannot fail? Or will there always be small outside forces acting on the computer that can throw things off?
And to wander off topic just slightly, we can prove (with a lot of work) that software components can be absolutely correct. I assume that we can prove (with a lot of work) that hardware components are absolutely correct. Given both of these assumptions (and no overclocking), is it possible to create a program that cannot fail? Or will there always be small outside forces acting on the computer that can throw things off?
Indefinity
 
Posts: 84
Joined: Thu Dec 24, 2009 7:49 pm UTC

Re: Computers and Infallibility

Postby Cleverbeans » Tue Feb 09, 2010 7:05 pm UTC

I think the Pentium FPU problems are proof enough that computers can indeed be fallible without a software error.
"Whenever we come upon one of those intensely right words in a book or a newspaper the resulting effect is physical as well as spiritual, and electrically prompt" - Mark Twain
Cleverbeans
 
Posts: 581
Joined: Wed Mar 26, 2008 1:16 pm UTC

Re: Computers and Infallibility

Postby octonion » Tue Feb 09, 2010 9:33 pm UTC

To paraphrase Dijkstra: "The question of whether a computer can think make mistakes is no more interesting than the question of whether a submarine can swim."

Right now it's easy to trace bugs back to human programmers whose code did not match the behavior they had in mind. Some future computer that could intelligently modify its own behavior might be seen as having more responsibility for its "mistakes".
octonion
 
Posts: 22
Joined: Mon Nov 09, 2009 9:24 pm UTC

Re: Computers and Infallibility

Postby Area Man » Tue Feb 09, 2010 11:00 pm UTC

Cleverbeans wrote:I think the Pentium FPU problems are proof enough that computers can indeed be fallible without a software error.

Intel wrote:The cause of the problem traces itself to a few missing entries in a lookup table used in the hardware implementation algorithm for the divide operation.
Sounds like a builder error to me.
High-k gates and EMI shielding have their limits, and are engineered for such, including various error detection/correction/coding procedures.

A computer that doesn't follow instructions precisely is broken by definition.

Berengal wrote:In my experience, user input is indistinguishable from true random values.
User input is _user_. Put. In.
...besides other problems. But that's probably off topic.

To err is human, and so forth.
Bisquick boxes are a dead medium.
User avatar
Area Man
 
Posts: 216
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: Computers and Infallibility

Postby Cleverbeans » Wed Feb 10, 2010 2:54 am UTC

Area Man wrote:A computer that doesn't follow instructions precisely is broken by definition.


If we're going to exclude hardware and software errors then I guess the question reduces to "Are Turing Machines ever wrong?" and the answer is... only when asked to do something incomputable? I'm forced to agree with the swimming submarine analogy at this point.
"Whenever we come upon one of those intensely right words in a book or a newspaper the resulting effect is physical as well as spiritual, and electrically prompt" - Mark Twain
Cleverbeans
 
Posts: 581
Joined: Wed Mar 26, 2008 1:16 pm UTC

Re: Computers and Infallibility

Postby Area Man » Wed Feb 10, 2010 8:26 am UTC

Cleverbeans wrote:If we're going to exclude hardware and software errors then I guess the question reduces to [ ... ]
Scroll up to read Amtran's question.
Bisquick boxes are a dead medium.
User avatar
Area Man
 
Posts: 216
Joined: Thu Dec 25, 2008 8:08 pm UTC
Location: Local

Re: Computers and Infallibility

Postby Yakk » Wed Feb 10, 2010 9:10 pm UTC

When designing hardware, the designers accept a certain level of error.

They may use error correction, but even that only is against a certain level of error.

In general, hardware is expected to fail, by design. It is just expected to fail rarely. One way to make it 'rare enough' is to design your hardware such that expected time between failures is on the order of the heat death of the universe (or some other ridiculous duration), then wash your hands of the problem.
Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.
User avatar
Yakk
 
Posts: 6326
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Re: Computers and Infallibility

Postby ttnarg » Fri Feb 12, 2010 3:33 pm UTC

Computer Errors do happen but User/coder errors are far more common. the best example are networks we link computers together with a very long cable and try to crame as much data down the cable as possable. When we put so much down we have problems reading it 100% of the time we add checksums at the other end to tell if we read it right. but if some of out data is croupted by noise on the line there is a random chance that the checksum would look right. Is this a computer error or a user error? Its the same inside the computer the faster we make computer the more we have to be carfull about this stuff but 99.9999% of the time its the human problem.

PS is the dead pixal on my screen a computer error?
ttnarg
 
Posts: 35
Joined: Tue Jan 05, 2010 5:50 pm UTC

Re: Computers and Infallibility

Postby not baby Newt » Sat Feb 13, 2010 1:04 am UTC

One aspect of programming error is that there are a LOT of programmers who have to be fairly close to correct for a computer to do what you want. Various OS components and such could in theory spoil your pie.
not baby Newt
 
Posts: 21
Joined: Wed Feb 03, 2010 11:30 pm UTC

Re: Computers and Infallibility

Postby Rockberry » Sat Feb 13, 2010 2:29 am UTC

No, computers are not infallible.
User avatar
Rockberry
 
Posts: 109
Joined: Tue Jan 12, 2010 9:24 am UTC
Location: UK

Re: Computers and Infallibility

Postby You, sir, name? » Sun Feb 14, 2010 3:51 am UTC

There's always the off chance that sufficient electron tunneling occurs for a bit to randomly flip in such a manner that the program is wrong. It shouldn't be a common occurrence, but it's not entirely preposterous to suggest either. Probably about as common as cosmic rays.
Blag.
Ternary computer emulator. Latest version is 0.5 [Nov 29 2008].

Good morning, that's a nice tnetennba.
User avatar
You, sir, name?
 
Posts: 2971
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City

Re: Computers and Infallibility

Postby WarDaft » Sun Feb 14, 2010 6:16 am UTC

Deterministic computation is tautologically infallible, because if it could make a mistake at some point, it wouldn't be deterministic. The question then becomes how close is a physical computer to a theoretical computer, and the answer is pretty close.
His chances for survival shrank from small to infinitesimal.
His chances for survival shrank from small to infinitesimal.
His chances for survival shrank from small to infinitesimal!
User avatar
WarDaft
 
Posts: 368
Joined: Thu Jul 30, 2009 3:16 pm UTC

Re: Computers and Infallibility

Postby Daniel Newby » Sun Feb 14, 2010 2:31 pm UTC

Computers are fallible by design!

<EE lecture mode>

One way they can break is metastability. Suppose your computer is sampling an external binary signal (say, USB cable), and the sampling clock happens to align with a change on the input. The sampling circuit can end up storing neither zero nor one, but some intermediate voltage, a metastable state. The downstream logic circuits can do just about anything when presented with a crazy signal like that. Like a pencil balanced on its point, pretty soon the stored value will tip one way or the other due to random environmental influences, but "pretty soon" turns out to be a long time when the clock ticks a billion times a second. You can do use things like a chain of sampling circuits (flip-flops) to reduce the failure rate to microscopic levels, but the failure rate is never exactly zero.

Another way they can break is random noise. These days, hard drives and wireless cards don't even pretend to use strong signals. Instead they keep packing in more bits until the noise is a major fraction of the signal, then fix it later with an error correcting code. Since you have to put in an error correcting code anyway, you might as well pack in three times the data while you're at it. The thing is, the correction only work statistically. You can make the failure rate extremely low, but never zero.

</EE lecture mode>
Daniel Newby
 
Posts: 3
Joined: Sun Feb 14, 2010 11:39 am UTC

Re: Computers and Infallibility

Postby ttnarg » Mon Feb 15, 2010 10:37 pm UTC

random fact:

When they make the PS3 they make it with 8 'cores' co-prossecssers but the odds the all of them are going to work is low*. the odds that 7 of them work is much higher so the all PS3 games have to work on a PS3 with 7 cores... inface if all 8 work they disable one.


* what low meens I dont know maybe 1 in 4 not working is too low to be proftiable
ttnarg
 
Posts: 35
Joined: Tue Jan 05, 2010 5:50 pm UTC

Re: Computers and Infallibility

Postby You, sir, name? » Mon Feb 15, 2010 11:15 pm UTC

ttnarg wrote:random fact:

When they make the PS3 they make it with 8 'cores' co-prossecssers but the odds the all of them are going to work is low*. the odds that 7 of them work is much higher so the all PS3 games have to work on a PS3 with 7 cores... inface if all 8 work they disable one.[citation needed]


* what low meens I dont know maybe 1 in 4 not working is too low to be proftiable


Fix'd.
Blag.
Ternary computer emulator. Latest version is 0.5 [Nov 29 2008].

Good morning, that's a nice tnetennba.
User avatar
You, sir, name?
 
Posts: 2971
Joined: Sun Apr 22, 2007 10:07 am UTC
Location: Chako Paul City

Re: Computers and Infallibility

Postby Xanthir » Tue Feb 16, 2010 2:10 am UTC

I wish you'd fixed the rest of it.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))
User avatar
Xanthir
 
Posts: 2886
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: Deep in the heart of Texas

Re: Computers and Infallibility

Postby hintss » Thu Feb 18, 2010 9:28 am UTC

here:

*overclock
*hammer
*lN2
*memory overflow error due to hardware limitation
*butterfly
*dust in manufacturing
*if the computer is a lone transistor. hooked up backwards
*Woz's knight's tour program(froze computer due to hardware speed limitation
*complaining about slow virtualisation when you don't have a virtualisation chip
*complaining about bad gaming when on an Altair with no terminal or teletype
User avatar
hintss
 
Posts: 1021
Joined: Wed Nov 25, 2009 7:19 am UTC
Location: In ur serverz, wasting ur bandwidthz


Return to Coding

Who is online

Users browsing this forum: No registered users and 6 guests