Re: puzzle



In article <1119942810.636779.116860@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
spinoza1111@xxxxxxxxx says...
> moi wrote:

> > Most of us use base-2 (binary computers)

> I've already shown how these dull, empirical replies such as "most of
> use base-2 computers" and "my favorite laundry list of programming
> languages all permit access to a binary representation" don't address
> the need to minimize your theoretical assumptions, AND how this
> apparently "only theoretical" consideration creates crap code in
> pragmatic space.

Actually, the XOR solution generalises to any data that can be
canonically represented as a two-coloured image, which is an operation
accessible to any general purpose computer, irrespective of how its ALU
operates. Clearly it works on any data that can be canonically
represented. XOR-like operations can be generalised further to a
variety of bitwise processes operating on multi-coloured images, where
each bit goes through a finite cycle of colours/values. It's a logical
operation more than it is a base-2 arithmetic operation - it is just
convenient that the most useful form of it comes naturally with base-2
arithmetic hardware.

> > > And, of course, this solution doesn't address change to floating point.

> > Has been answered already. Given a canonical reprentation, it will work
> > similarly. (even regardles of FP representation)

> Given enough of anything, anything will work. The point being that the
> problem is O(n^2) and not O(n) because you have to introduce a
> conversion magical from the standpoint of theory to make it O(n), one
> that has practical results in the form of obfuscated code.

Conversion of data to a canonical binary form is 'magical from the
standpoint of theory' now? As compared to what operation?

> A grown up programmer would avoid the XOR solution UNLESS it was needed
> *in extremis* to save time. But this "puzzle" makes it central to
> complexity theory, which is just bullshit.

Complexity theory deals with the properties of arbitrary algorithms.
No algorithm becomers 'central' to it by being analysed using it. If
complexity theory failed to deal equally with all algorithms, it would
be useless.

- Gerry Quinn
.



Relevant Pages

  • Re: INT defect: Please try this on 2007 for me
    ... that I have provided to back up my explanation. ... VALUEconverts A1 as Excel would do to ... the exact internal representation of 40000.846. ... ROUNDDOWN returns the binary representation of 40000.845, ...
    (microsoft.public.excel.worksheet.functions)
  • Re: scwewy answers that dont belong
    ... And it is not just that there might be no exact binary representation ... set of pairwise operands has the same binary magnitude, ... that might be a viable solution for you, ...
    (microsoft.public.excel.worksheet.functions)
  • Re: n-ary representation and divisibility
    ... >Recently I have an observation about algorithms on divisibility of ... >But we perform all these algorithms mostly under decimal representation ... What about for different n-ary representation? ... The reason why a number in decimal form is divisible by 3 iff the sum ...
    (sci.math)
  • Re: hi everyone, i had s.ome questions about holographic information
    ... post-offset need to be stored for each base representation, ... i've not come across any algorithms like it, but as i can just see it ... To have a stream type compression with advanced algorithms (even ... since in this analogy the data set size is only limited by the memory ...
    (comp.compression)
  • Re: n-ary representation and divisibility
    ... > times the leftmost group and add on the second leftmost group, ... > But we perform all these algorithms mostly under decimal representation ... What about for different n-ary representation? ... > for m-ary representation of a. ...
    (sci.math)