Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.math > #325272

Re: Algorithm involving binary strings.

From James Waldby <not@valid.invalid>
Newsgroups sci.math
Subject Re: Algorithm involving binary strings.
Date 2015-12-31 01:18 +0000
Organization A noiseless patient Spider
Message-ID <n61vom$4fj$1@dont-email.me> (permalink)
References <4f1a0e21-4563-4697-8b6e-b4c41f8381ae@googlegroups.com> <shi88b53obck9bk6mgt63pe822jep4cv03@4ax.com>

Show all headers | View raw


On Wed, 30 Dec 2015 16:30:04 -0500, quasi wrote:

> Paul wrote:
> 
>>Suppose we are given a collection of binary strings all of 
>>the same length.  The problem is to find the largest number
>>n such that there exist distinct strings s1, s2 such that n
>>positions are set to 1 in both s1 and s2 simultaneously.  
>>Also, the task is to find all pairs so that this maximum is 
>>realised.
> 
> Let S be a set of m binary strings, each of length k.
> 
> For the purpose of this problem, are the numbers m,k 
> potentially "huge"?

Another question is if 1-bits are sparse.  For example, there
could be some heuristic method that does well, if some certain
proportion of 1-bits facilitates divide-and-conquer.

>>This is easy to do but difficult to do efficiently.  
> 
> In other words, you want an algorithm that's computationally
> efficient in an order of magnitude sense? In terms of m and
> k? In terms of m*k? 
> 
> What "easy" algorithm do you already have? What's its order 
> of magnitude cost of computation?

The most-obvious algorithm -- testing all pairs of strings -- 
costs O(k*m^2).  Perhaps some alpha-beta pruning search method,
using a string's bit population (number of 1s) and its balance
(average location of 1s) or other measures, could on average 
lower the number of comparisons made (but would probably still
have O(k*m^2) worst case cost).

-- 
jiw

Back to sci.math | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Algorithm involving binary strings. Paul <pepstein5@gmail.com> - 2015-12-30 09:41 -0800
  Re: Algorithm involving binary strings. Virgil <VIRGIL@VIRGIL.com> - 2015-12-30 13:16 -0700
  Re: Algorithm involving binary strings. quasi <quasi@null.set> - 2015-12-30 16:30 -0500
    Re: Algorithm involving binary strings. James Waldby <not@valid.invalid> - 2015-12-31 01:18 +0000
  Re: Algorithm involving binary strings. JohnF <john@please.see.sig.for.email.com> - 2015-12-31 06:53 +0000
    Re: Algorithm involving binary strings. Paul <pepstein5@gmail.com> - 2015-12-31 06:46 -0800
      Re: Algorithm involving binary strings. Paul <pepstein5@gmail.com> - 2015-12-31 07:38 -0800
        Re: Algorithm involving binary strings. John Forkosh <forkosh@panix.com> - 2016-01-01 02:19 +0000
          Re: Algorithm involving binary strings. JohnF <john@please.see.sig.for.email.com> - 2016-01-01 11:44 +0000
          Re: Algorithm involving binary strings. Paul <pepstein5@gmail.com> - 2016-01-01 05:00 -0800
            Re: Algorithm involving binary strings. JohnF <john@please.see.sig.for.email.com> - 2016-01-02 02:11 +0000
              Re: Algorithm involving binary strings. Paul <pepstein5@gmail.com> - 2016-01-02 02:20 -0800
                Re: Algorithm involving binary strings. JohnF <john@please.see.sig.for.email.com> - 2016-01-02 12:50 +0000
                Re: Algorithm involving binary strings. Paul <pepstein5@gmail.com> - 2016-01-02 07:12 -0800
                Re: Algorithm involving binary strings. JohnF <john@please.see.sig.for.email.com> - 2016-01-03 04:55 +0000

csiph-web