A Math Question (really!)

At the risk of polluting sci.engr.control with cross-posted, slightly OT material:

I have had clients send me contracts asking me to indemnify them against any and all damage caused to their company by my work. (FYI, according to my $6/minute lawyer, "indemnify" means "insure", and I'm not an insurance company).

Everything I do is in the form of fairly abstract analysis and design, and it either gets embodied into software by my clients' software engineers, or I do just the algorithms which then get embedded into my clients' software. So the performance of _anything_ I do is completely at the mercy of my clients' engineering process -- and I've only worked for one company, as a consultant, who really had a "good" software quality process (and they had to, 'cause the FDA looked over their shoulder).

So I could easily see a situation where I do everything right, my client screws up the implementation, and I find myself sitting in front of a jury of 12 hairdressers, trying to explain software quality practices vs. good algorithms.

As I see it, for every right way to embody my work in software, there is an infinite number of wrong ways.

Since there just has to be an infinite number of _right_ ways to embody my work in software, it leads to the math question:

What sort of infinity is the number of wrong ways to do software, since for any given problem there's an infinite number of right ways to solve it, and for any given right solution there's an infinite number of wrong solutions?

Is it just Aleph 1 (whose definition I dimly remember), or is it Aleph 2, or some other infinity? I _think_, assuming that there are an infinite _integer_ number of ways (right and wrong) to do it, then its the same infinity both ways (there's a clever and easy proof showing that a 2D infinite grid of points has a 1:1 mapping onto a 1D line of points).

So, what do _you_ think?

--
http://www.wescottdesign.com
Reply to
Tim Wescott
Loading thread data ...

I think it's Aleph null, actually. (I think that's what you had in mind when you wrote Aleph 1.)

First of all, you need to make clear the difference between your work, and the application (by others) of your work, and to rule out the second.

Then you need to know the outside extent of the potential liability, so you know how much insurance to buy and to add to your BoM. That should sober them up!

Jerry

--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply to
Jerry Avins

There are no infinite number of wrong ways to do software. Assuming a 100 GB harddisk, there are 2^8^(100^9) different possible combinations how to fill the harddisk, including source code, OS, documents etc.

Regarding your problem: There are insurance corporations, which can help you. But it sounds strange, that they want you to be liable for anything. If the product doesn't sell, is this your fault? Usually you are only liable for grossly negligent faults.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Reply to
Frank Buss

It is ultimately up to them to come up with some sort of verification/ qualification process to test out their system prior to selling it or delivering it to their customer.

My knee jerk reaction is to tell them to go jump off a bridge (but that iseasy for me to say). If I were in your situation, I would not offer to indemnify them (Are you pockets that deep?). I would offer to help them to define their qualification process so that *THEY* can feel good (and safe) about what they ultimately deliver. If their engineers cannot make a tradeoff about how much verification/ qualification they need to do then they are pretty lame.

Reply to
bulegoge

It is only countably infinite, since the resulting civil complaint can be only a countable string of English words.

Obviously unless one wants to pay for E&O insurance (few of us do), one should avoid signing up for such language.

Steve

Reply to
Steve Pope

I just say "I'm not an insurance company" and leave it at that. If I really needed the work my best bet would probably be to get a regular job.

--
http://www.wescottdesign.com
Reply to
Tim Wescott

That only suggests there is a finite limit to doing it the right way. To do it wrong you could attempt to write the program to infinite many hard disks, or an infinite number of other things that are not even hard disks, or not write the program at all and do one of an infinity of other things.

Reply to
jim

I'd accuse you of being a smartass, but where would that leave me and my original assertion.

Are you saying that bad software never outgrows it's storage space?

There seems to be a mind-set among some lawyers to try to sneak obnoxious clauses into contracts and hope that the naive engineer will sign. When they're really bad, I send the contract back with the comment "when your lawyer tells you that you could sign it on the right side, then I'll consider signing it on the right side".

(And when _my_ lawyer and I drew up _my_ standard contract, I directed _him_ to make sure that the contract was fair in both directions. If you have to treat your contractors like enemies, there's something wrong with your mind set).

--
http://www.wescottdesign.com
Reply to
Tim Wescott

Even if you use every atom in the universe for saving a bit, it's still not infinite: Maybe there are 10^80 atoms in the universe, so there are

2^8^(10^80) possible configurations. And it is still finite, if you consider all possible state changes, e.g. with a 1 GHz CPU.

Being a smart ass :-) you could argue that there are non-digital possible changes in computers, if there are faults, but even this is finite, e.g. if you argue with quantum physics, e.g. with the smallest time unit (

formatting link
) and elementary charge (
formatting link
).

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Reply to
Frank Buss

thanks :-)

No, I was just responding to your statement, that there are an infinite number of ways to do wrong software. But I doubt that mathematics helps much with lawyers.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Reply to
Frank Buss

When I see the clause, I strike it out and refuse the work if they insist. Usually, if needed, the simple explanation that I'd protect them about as well as a piece of tissue paper facing a blowtorch is enough to clarify the situation and let them realize that it makes no sense at all.

Jon

Reply to
Jon Kirwan

But there *are* liability insurance companies. If you needed a contract and were unable to negotiate that clause out, just find an insurance company that *will* take the risk and pass your insurance cost on to the client.

--
Ben Jackson AD7GD

http://www.ben.com/
Reply to
Ben Jackson

True, but there's some jargon to consider. "General Liability" insurance does not cover this type of problem. You need E&O (Errors and Omissions)insurance and it is costly.

I'm not entirely sure how practical it is to buy such insurance for just one problem contract. Maybe someone with experience on this point can comment.

Steve

Reply to
Steve Pope

[...]

The real question is if you are worth to be sued. The indemnification clause is not that unusual, however it implies automatically no more and no less than if you damage their equipment, you got to pay. If they want to make you accountable for all kinds of direct and indirect consequences, that's a NP-complete problem of theirs regardless of this clause.

From my personal experience, the more BS is included in the contract, the less is their interest in the actual job to be done.

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

I think you should consult a real lawyer. I also suspect you are getting trapped by historic advice from company lawyers, who have no idea what is being bought and sold, and the plebes are just passing that advice on to you.

--
 [mail]: Chuck F (cbfalconer at maineline dot net) 
 [page]: 
            Try the download section.
Reply to
CBFalconer

Hello Tim,

Several of my clients insisted on the insurance and since the contracts were very lucrative, I got the "errors and omissions" insurance. Even though the insurance is not cheap, it was less than 1% of the contract's value. You can try to strike it out and smaller clients may give in, but I had contracts with two of the top four cellular providers where I had all of the info on their system, locations, channel plans, access codes, you name it. They just wanted their infrastructure protected.

I recall one client wanted me to basically guarantee that the work I did did not violate any patents. I said I can't guarantee that. And years later his project is still unbuilt! Just my 2 cents worth.

Clay

Reply to
clay

Oh, I have no problem knowing what to do, having already gotten advise from my (real) lawyer: "Tim, you're a consultant, not an insurance company. Don't sell insurance". (I like my lawyer -- he and I agree on everything important, he just knows the right way to put it down in writing).

--
http://www.wescottdesign.com
Reply to
Tim Wescott

Do they also offer to pay you for any and all benefit to their company through your work? If not, the contract is pretty unbalanced !

You are thinking of Aleph 0, also known as "countably infinite". It's basically the number of integers.

It's easy to see that the number of possible programs is countably infinite (disregarding silly things, like limits to the size of the universe - this is maths, not reality). Any computable algorithm can be run on any Turing-complete machine, such as a Turing machine, a Universal Register Machine, or an AVR processor with unlimited memory (*not* infinite memory, but *unlimited* memory, meaning you never reach its end). Any software you or anyone else writes can run on this AVR, given enough time and memory resources (for example, you could port QEMU to it and run Windows in an emulator).

So this gives you a way to turn any possible algorithm or implementation, working or not working, into a program on your unlimited AVR. Take the binary object code, think of it as a *very* big integer in binary. There you have a mapping from the space of possible programs into the set of integers. Conversely, any integer could be treated as the AVR's program, giving you a reverse mapping (for the really pedantic, you can do some tricks to avoid invalid opcodes and the like).

Thus the number of possible programs is countably infinite - aleph 0.

For your interest and information, aleph 1 is two to the power aleph 0. This is clearly bigger than aleph 0 - it's the number of real numbers. The really interesting question is if there is anything between aleph

0 and aleph 1...

As for your proof about the number of points on a 2D grid being the same as the number of points on a ruled line, take a piece of squared paper. Start with a cross in the middle of the page, and then draw a spiral through the other crosses, getting gradually bigger.

Since binary comes naturally to these newsgroups, an easy alternative is to consider your X-Y points as having two coordinates in binary. Map each X-Y point to your line by mapping bit n of the X coordinate to bit

2n of your line point, and bit n of the Y coordinate to bit (2n + 1) of the line point.

mvh.,

David

Reply to
David Brown

You are right, for turing machines there are an infinite number of programs. For AVR you'll need a modified structure, because e.g. 16 bit absolute pointer registers are not very useful for unlimited memory. My answer was in the context of the question, how many ways there are for Tim Wescott to do it, maybe I misunderstood it.

Another ineresting thing is, that the number of working program is aleph_0 and the number of non-working programs is aleph_0, too. This is because of the nice property that aleph_0 + aleph_0 = aleph_0. For trying to understand this, Hilbert's Grand Hotel helps:

formatting link
's_paradox_of_the_Grand_Hotel

I don't understand this proof. I assume you mean a archimedean spiral like this:

formatting link

For which number a and b all points on a grid with infinite small distance between points, will be coverd?

Which point on the line is the point (pi, sqrt(2)) on the plane?

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Reply to
Frank Buss

Yes you have revised the question in a way that your answer is clearly right. But the question wasn't "how many possible forms can a delivered block of code take" it was how many possible wrongs is included in the phrase "any and all damage caused to their company by my work". although doing it right may be definable and limited in the way you have done. Doing it wrong pretty much includes anything that is not "right". For instance, accidentally setting the premises on fire while on a consultation visit. Since you have already demonstrated that you can't even begin to imagine how many "wrongs' this phrase might include it is hard to see how you would proceed to enumerate them.

-jim

Reply to
jim

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.