OnlineWoerterBuecher.de
Internes

Lexikon


fencepost error


1. (Rarely "lamp-post error") A problem with the discrete equivalent of a boundary condition, often exhibited in programs by iterative loops. From the following problem: "If you build a fence 100 feet long with posts 10 feet apart, how many posts do you need?" (Either 9 or 11 is a better answer than the obvious 10). For example, suppose you have a long list or array of items, and want to process items m through n how many items are there? The obvious answer is n - m, but that is off by one the right answer is n - m + 1. The "obvious" formula exhibits a fencepost error. See also zeroth and note that not all off-by-one errors are fencepost errors. The game of Musical Chairs involves a catastrophic off-by-one error where N people try to sit in N - 1 chairs, but it' s not a fencepost error. Fencepost errors come from counting things rather than the spaces between them, or vice versa, or by neglecting to consider whether one should count one or both ends of a row. 2. (Rare) An error induced by unexpected regularities in input values, which can (for instance) completely thwart a theoretically efficient binary tree or hash coding implementation. The error here involves the difference between expected and worst case behaviours of an algorithm. [Jargon File] (1994-12-01)

In addition suitable contents:
[ 2 ] [ = ] [ ai ] [ al ] [ algorithm ] [ am ] [ an ] [ ar ] [ arc ] [ arg ] [ array ] [ as ] [ ash ] [ at ] [ av ] [ b ] [ be ] [ bi ] [ binary ] [ binary tree ] [ bit ] [ bite ] [ bo ] [ bot ] [ bv ] [ by ] [ C ] [ ca ] [ case ] [ cat ] [ Ch ] [ ch ] [ ci ] [ co ] [ com ] [ complete ] [ con ] [ cons ] [ cr ] [ de ] [ diff ] [ ding ] [ disc ] [ do ] [ du ] [ E ] [ ec ] [ ed ] [ ee ] [ eg ] [ eh ] [ er ] [ era ] [ error ] [ es ] [ et ] [ expect ] [ fence ] [ fi ] [ file ] [ fo ] [ for ] [ formula ] [ fr ] [ ga ] [ gh ] [ gl ] [ gr ] [ gs ] [ gu ] [ h ] [ hair ] [ hash ] [ hash coding ] [ hat ] [ hing ] [ hm ] [ hr ] [ ht ] [ id ] [ ie ] [ iff ] [ il ] [ in ] [ input ] [ instance ] [ io ] [ ir ] [ is ] [ it ] [ J ] [ Jargon File ] [ la ] [ lamp-post error ] [ ld ] [ Lex ] [ li ] [ list ] [ loop ] [ ls ] [ lu ] [ lv ] [ ly ] [ M ] [ ma ] [ man ] [ mo ] [ mod ] [ module ] [ mp ] [ ms ] [ Mu ] [ mu ] [ Music ] [ N ] [ na ] [ nc ] [ ne ] [ ng ] [ no ] [ np ] [ ns ] [ off-by-one error ] [ om ] [ op ] [ pa ] [ pe ] [ ph ] [ pl ] [ post ] [ pr ] [ process ] [ program ] [ query ] [ rc ] [ re ] [ rete ] [ ro ] [ row ] [ S ] [ sa ] [ sc ] [ se ] [ sh ] [ si ] [ sit ] [ so ] [ space ] [ st ] [ su ] [ T ] [ th ] [ to ] [ tr ] [ tree ] [ tt ] [ tw ] [ ug ] [ up ] [ us ] [ va ] [ value ] [ ve ] [ vi ] [ wart ] [ win ] [ zero ] [ zeroth ]






Go Back ]

Free On-line Dictionary of Computing

Copyright © by OnlineWoerterBuecher.de - (7317 Reads)

All logos and trademarks in this site are property of their respective owner.

Page Generation in 0.0995 Seconds, with 17 Database-Queries
Zurück zur Startseite