## search algorithms – Find dominated or subsumed linear inequalities efficiently

Given a set of $$N$$ linear inequalities of the form $$a_1x_1 + a_2x_2 + … + a_Mx_M geq RHS$$, where $$a_i$$ and $$RHS$$ are integers. The inequality $$A$$ dominates or subsumes inequality $$B$$ if all its coefficients are less or equal and $$RHS_A geq RHS_B$$. Most inequalities are sparse, i.e. most coefficients are zero. Usually, both $$N > 1000$$ and $$M > 1000$$. I’m trying to identify dominating or subsuming inequalities efficiently.

What are quick ways to find
a) if an inequality is dominated by any other inequality, and
b) which inequalities are dominated by a given inequality?

(Monte-Carlo algorithms are fine, that only report correct results most of the time)

Eén, N. and Biere, A., 2005, June. Effective preprocessing in SAT through variable and clause elimination. In International conference on theory and applications of satisfiability testing (pp. 61-75). Springer, Berlin, Heidelberg. (chapter 4.2) discuss a variant of this problem in the context where all coefficients are binary, i.e. $$a_i in {0, 1}$$. They propose occurrence lists, one per variable $$x_i$$, containing all inequalities with non-zero coefficients $$a_i$$. Additionally they use a hashing scheme, similar to Bloom filters, to quickly eliminate candidates. I don’t see how to translate this to non-binary coefficients.

Achterberg, T., Bixby, R.E., Gu, Z., Rothberg, E. and Weninger, D., 2020. Presolve reductions in mixed integer programming. INFORMS Journal on Computing, 32(2), pp.473-506. (chapter 5.2) discuss a variant of the problem, but don’t solve it. They first hash inequalities by indices of non-zero coefficients and the coefficient values. Additionally, they limit their search to a small subset of inequalities.

Schulz, S., 2013. Simple and efficient clause subsumption with feature vector indexing. In Automated Reasoning and Mathematics (pp. 45-67). Springer, Berlin, Heidelberg. describes Feature Vectors for clauses and a kd-tree-like data structure to query combinations of feature vectors.

• The trivial solution is to check all pairs of inequalities in $$O(n^2)$$. Unfortunately, that’s too slow for my application where I have millions of inequalities.
• I tried performing a random projection of the coefficients for every inequality, resulting in a projection $$p_j$$ for every inequality. An inequality $$j$$ can only dominate inequality $$k$$ if $$p_j leq p_k$$. Thus we don’t have to check all pairs. I repeat this process 10 times with multiple random projections, and use the random projection where I have to check the fewest pairs. In practice this is not effective, as most coefficients are zero – and it’s unlikely that a random projection focusses exactly on the few non-zero elements. It doesn’t help nearly enough.
• Similarly I implemented Feature Vectors, but couldn’t replicate the performance reported by Schulz.
• AFAIK, multi-dimensional data structures break down in high-dimensional scenarios (curse of dimensionality). I’m not aware of indexing techniques that work for high-dimensional range queries.
• I thought about Bloom filters, unsuccessfully.
• I thought about randomized algorithms, unsuccessfully.

Do you have any other ideas?

## How To Find And Hire Healthcare App Developers

Remote hiring of software developers for healthcare software solutions is becoming pervasive with every passing day. With the increasing demand of offshore mobile software development in the healthcare industry, the remote software developer salary is consistently rising up in the entire global marketplace. Read our latest guide on how to hire healthcare app development company for your startup and save money.

## browser – Help find this icon/website

This is from a Kindle Fire and is a shot of a tab in the Silk Browser. The tab is one of many and only half is visible, but there is a chat bubble with something (maybe a heart?) inside of it. There is also a very clear ‘A’ as the first letter on the tab, but nothing else. I have no more information than what is in this picture, but I hope it is enough to get an idea of what this is.

## java – gradle could not find guava-*version*-cdi1.0.jar

Might be something obvious, but this issue got me stuck for a while.

Some of the libraries require `com.google.guava:guava:21.0` as the dependency, however gradle fails to fetch it from the maven repository. it’s a legacy project, so versions are not the latest.

Error log:

``````FAILURE: Build failed with an exception.

* What went wrong:
> Could not resolve all files for configuration ':compileClasspath'.
> Could not find guava-21.0-cdi1.0.jar (com.google.guava:guava:21.0).
Searched in the following locations:
``````

`guava-21.0.jar` (without `-cdi1.0` suffix) exists on that path. Why does gradle ads the `-cdi1.0` suffix to the filename and is it possible to disable this feature? or i simply misunderstanding something and there is something else in play?

i tried to specify `guava` dep separately `compile(group: 'com.google.guava', name: 'guava', version: '21.0')`, however it doesn’t affect anything.

build.gradle: (generated by `gradle init` from maven pom.xml)

``````plugins {
id 'java'
id 'maven-publish'
}

repositories {
mavenCentral()
maven {
url = 'http://repo.maven.apache.org/maven2'
}
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web:1.4.1.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-jdbc:1.4.1.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-actuator:1.4.1.RELEASE'
... etc other deps
}

group = 'com.springapp'
version = '1.0-SNAPSHOT'
description = 'someproj'
java.sourceCompatibility = JavaVersion.VERSION_1_8

publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}

options.encoding = 'UTF-8'
}
``````

## sequences and series – Find \$a_1+frac{a_2}{2}+frac{a_3}{2^2}+cdotsinfty\$

A sequence $$left{a_nright}$$ is defined as $$a_n=a_{n-1}+2a_{n-2}-a_{n-3}$$ and $$a_1=a_2=frac{a_3}{3}=1$$

Find the value of $$a_1+frac{a_2}{2}+frac{a_3}{2^2}+cdotsinfty$$

I actually tried this using difference equation method.Let the solution be of the form $$a_n=lambda^n$$
$$lambda^n=lambda^{n-1}+2lambda^{n-2}-lambda^{n-3}$$ which gives the cubic equation $$lambda^3-lambda^2-2lambda+1=0$$. But i am not able to find the roots manually.

## What is a Camera used for? can’t find this anywhere on Google?

I got a camera for christmas, but when I turn it on the screen is just black, I think its used for taking pictures but i dont know how.

## applications – How to find where an app is saving its data and then acess it?

#### Stack Exchange Network

Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

## nonce – hello please let me know whats wrong with this script for find Reuse R value

``````hello friends here is the code to find reuse R values of bitcoin transaction but unfortunately it is not scanning more than 51 transaction secondly it can only use one address at a time and i want to use text file to check multiple addresses as well as i want to save the output in a text file please help me to sort out
``````

import json

import urllib2

import time

import sys

#for some reason blockchain.info api-chain is 59711 blocks short..

blockstart = 170399

blockstart += 59711

print “WELCOME TO R-scan v0.1.2!”

#control api-url

print “Data for pubkey: ” + str(addr)

print “number of txs: ” + str(addrdata(‘n_tx’))

#tx-details:

y = -0

inputs = ()

print “#################################################################################”

print “TX nr :” + str(y+1)

print “number of inputs: ” + str(addrdata(‘txs’)(y)(‘vin_sz’))

#only if

zy = 0

``````  print "Input-ScriptNR " + str(zy+1) + " :" + str(addrdata('txs')(y)('inputs')(zy)('script'))
``````
``````  inputs.append(addrdata('txs')(y)('inputs')(zy)('script'))
``````
``````  zy += 1
``````

y += 1

print “compare: “

xi = 0

zi = 1

lenx = len(inputs)

#compare the sig values in each input script

while xi < lenx-1:

x = 0

while x < lenx-zi:

``````  if inputs(xi)(10:74) == inputs(x+zi)(10:74):
``````
``````      print "In Input NR: " + str(xi) + "(global increment) " + str(inputs(xi))
``````
``````      print('a')
``````
``````                   print "Resued R-Value: "
``````
``````      print inputs(x+zi)(10:74)
``````
``````                   alert += 1
``````
``````  x += 1
``````

zi += 1

xi += 1

#check duplicates

print “Good pubKey. No problems.”

sys.exit()

## domains – How can I find recently released ccTLDs or gTLDs?

Is there any reliable source to get information about which new `ccTLD`s or `gTLD`s are going to be released next, on the internet?

My purpose in asking this question is that I want to be notified whenever a `.od` TLD comes into existence so that I can register a domain using it, immediately!

## javascript – Find the odd int challange

this is a function given an array of numbers to find the one that appears an odd number of times.

what I did is:

• Sort the array
• Check if the array is odd.
• If the array length is 1 then return this value.
• Assign every two values to a new array, and check if it is a number.
• Check if every two values are equals.
• If not equals then the result will be the first element on the new array
``````function findOdd(A) {

let copA = Array.from(A).sort((a, b) => a - b);
let res = 0;

if (copA.length % 2 === 0) return;
if (copA.length == 1) return res = copA(0);

let newArr = ();
for (let i in copA) {
// if not a integer break
if (!Number.isInteger(copA(i))) {
res = 0;
break;
};

newArr.push(copA(i));
if(newArr.length == 2) {
const (a,b) = newArr;
if (a === b) {
newArr = ();
} else {
res = a;
newArr(0) = b;
break;
}
} else if (newArr.length == 1) {
res = newArr(0);
}
}
return res;
}

// test the code
findOdd((20,1,-1,2,-2,3,3,5,5,1,2,4,20,4,-1,-2,5)); // 5
findOdd((1,1,2,-2,5,2,4,4,-1,-2,5)); // -1
findOdd((20,1,1,2,2,3,3,5,5,4,20,4,5)); // 5
findOdd((10)); // 10
findOdd((1,1,1,1,1,1,10,1,1,1,1)); // 10
findOdd((5,4,3,2,1,5,4,3,2,10,10)); // 1
``````

My code works well, but I looking to improve it.