 So I'm just going to do it in some way and it's going to work out the fast grain of salt because it's still exponential time but just faster than previous one, that's all. So let's consider the problem. We are considering the standard 3SAT problem, so you have a bunch of clauses and you want to find a satisfying assignment. So we will consider the variation which is known as either xSAT or 1 in 3SAT and so on and so forth. So you want that in each of the clauses exactly one literal gets satisfied. So you want to find those assignments and there are various other versions which are interesting such as finding all such assignments which make exactly one in each clause or finding how many of them are there. The particular problem which we are going to study is that we want to find how diverse these assignments can be. So in particular what has been studied earlier is what is the maximum hamming distance between two assignments which satisfy the requirements. So that's what we are going to be interested in. So by brute force you can consider all possible pairs of assignments which satisfy the clauses and then see what is their distance and so on that takes about 4 to the n time. For maximum hamming distance for just xSAT, not 3 xSAT, Dhalov did it in time about 1.83 to the n. For xSAT the earlier one was 1.676 to the n and for max hamming distance for xSAT it has been improved this year to 1.49. For xSAT in this talk we will do 1.3298 to the n. So just what is the history of how the improvement is done. So let's consider an example first. So let's consider that example x1 or x2 or x3 and so on. This was particularly chosen so that it becomes easier to say what's going on. So you have four assignments which make this xSAT problem satisfiable and all of them have distance 4. So if you take the same in both sides of course the distance is 0 there. So what we want to come up with is a formula something like this 12 u to the 4, u to the 4 will say that you have distance 4 and there are 12 pairs. Note that we are considering the first item, second item if you swap that is count 2. That just makes counting easier if you don't want that just divide by 2 everywhere but that makes the rest of the proof easier to just say we consider them as distinct plus 4 u to the 0. And the particular reason we want to put this in a formula like this is that it makes it easier to multiply add and so on and so forth for various things which we want to do. Just makes the computations easier. So let's consider the brute force idea. So you have a search tree. So you start from the root for each variable you consider all possibilities of the two assignments 0 0 0 1 1 0 1 1 and then see what happens. So you go down. So you have at each level four branches you have n variables it will give you 4 to the n. And at the leaf if the pair both of them are solutions then we consider what is the hamming distance between them. And if it is a distance is k you put u to the k as the value at the leaf. If one of them is not a solution at least one of them is not a solution you put it 0. And then you want to sum up all the values at the leaf that will give you the formula we are after. So well even though we have 4 to the n you might have some polynomial time computations at each level or each place to do whatever you are doing. That polynomial will be something of polynomial in the size of the formula and the number of variables. Throughout this talk I will ignore that polynomial because that's small compared to the exponential part so we will just ignore them. So what we do? So we will consider still the search tree like that. But at each point rather than punching as in brute force we want to do some simplifications. For example if we already know that some assignment to the variable is not going to work we want to get rid of it or we want to say in some sense that some variables are linked to each other. If x is 1, y must be 1. If x is 0, y must be 0 or whichever way we want to simplify get rid of that part. In all these kind of tricks you will have some polynomial time of computation to the simplification and the whole complexity depends on how many leaves you have. So what we are going to do mainly is do the simplification count the number of leaves and that number of leaves will be exponential and what is that exponential that gives us the complexity of the algorithm. So that's the basic idea. So you have an input set 3 set formula which we want to do x is the set of variables for phi in some notation. So we will use qxij is equal to u if i is not equal to j. Intuitively at the leaf assuming we were doing a brute force approach qxij says what x contributes to in that formula and if i is equal to j it will contribute 1. And so what we are going to essentially want to do is we are summing over all potential beta 1, beta 2 assignments and we are doing a product over all the variables of qx, beta 1, x, beta 2, j, x. So that's what our formula looks like. So whenever we are going to do simplification we want to maintain that below any node that summation holds. But we will do lots of changes here and there, rather than q we will use something else and so on. That's what the aim is. Yes? Qxij if you look at this actually I should have 4 branches and so on. So at some point at the bottom what you want is that you have some assignment beta 1, beta 2. You are trying to see whether beta 1 satisfies beta 2 satisfies. And based on that so if for any particular variable x we see in the 2 assignments whether x is same or not. If it is same we multiply by 1, if it is different we multiply by u. So that's what this is denoting. So this is what I intuitively said earlier. So we will have nodes that represent formula pairs phi 1 and phi 2. So that original phi both sides have been simplified in some way. That might be different simplification in the 2 sides, phi 1 and phi 2 we will get because we have set the variables differently or the linking might be different and so on. So phi 1 and phi 2 are there and some variables have been fixed values and so on. And our aim is as I said to calculate this function. But because we have made some changes we will have to record what we have updated. So we will have something called P main which will be intuitively record all the factors coming in when we have fixed some variables values and we will have Pxij instead of Qxij because Pxij has similar notion as Qxij but because some variables which are linked to x we want to carry that information along. So Pxij carries all that information along with it. So that's the intuition there. So at any node in the search tree we want to calculate the formula based on phi 1 and phi 2 are the 2 simplifications for the 2 sides which we are comparing. S1 and S2 are the values of some variables which we have fixed in the both sides. V is the current set of variables on which phi 1 and phi 2 depend. That is some subset of x and P, capital P is all the polynomials which we are carrying along. The P main and the Pxij which we are carrying along that will be what P is. Intuitively this is what MHD is going to calculate. P main multiplied by summation over all the beta 1, beta 2 for x and V so V is the current set of variables Px, beta 1, beta 2 x that's what it is supposed to give me. At the root because all the Pxijs will be Qxijs and all the variables are there that's the formula we wanted to actually have. At the root P main is 1. So that's the root value and we will go on exploring. So at any node in the search tree this is what we are going to calculate. And when we modify we want to make sure based on the children that formula is minted and that's correct then only we can do the induction. Of course this beta 1, beta 2 has to be consistent with S1 and S2 whatever we have been assigned only among those we consider. So initially we want to calculate both phi 1 and phi 2 are phi. S1, S2 have no assignments given V is x and P main is 1 and Pxij is Qxij as the initial values. So what we will do at any node is either we will branch over some variable just to shorten the proof many times we might branch over several variables in one go and simplify the formulas using some polynomial time. So that's what we will do at any node and we will ensure that the parent MHD is the sum of the children MHD. So main thing is because otherwise this gets very messy very difficult to see what's going on what we will ensure is that phi 1 and phi 2 are similar what we call similar what do we mean by similar that is they have the same number of clauses both sides initially it is always true because both are same and the clauses in them can be put in one to one correspondence with each other in such a way that each two clauses which are in one to one correspondence are similar what is the clause being similar means well they essentially look the same except the literals might be negated. So x, y, 0 is similar to not x, y, 1 okay so you might make some local changes but the variables don't change. So that's what we call similar so that 2, phi 1 and phi 2 will always be similar in any particular node okay. So why do we want this restriction well that's the only way we could analyze it otherwise it is too messy to analyze and that's why we kept similarity all over the place and this similarity is very much used in what part case 2 of our analysis has to be see later okay. This might make it inefficient so my algorithm may give very loose bounds because sometimes we might have fixed very value some variables but I can't remove it for example if we have a clause like x or x or 1 we know that x must be 0 okay because otherwise 1 in 3 set cannot work but I can't get rid of x because it might be used in some other place in the other side and so on okay. So let's give the node intuition behind algorithm and the case analysis so this will be a sketch of the proof case 1 is all about simplifications what we are going to do except in some cases we will see what punching we are doing case 2 is the bulk of the work but unfortunately I won't have time to go through it detail but I'm just say how that works so let's consider some simplifications which we are going to do. So if some clause in 5 1 or 5 2 cannot be satisfied at all for example it is like 0 or x or x whatever value you give to x if you give 0 none of them is 1 if you give it value 1 2 of them become 1 so we know that in this case that subtly is going to give you 0 so we immediately can say okay we return 0 we don't need to go down in that if x has been determined in both s1 and s2 okay but because of our simplification we haven't recorded it yet then we want to just say okay record it we don't need to consider x anymore so what we are going to do is record it in P main so multiply in P main summation of x P xij here ij has to be consistent with s1 and s2 if it has been already assigned some values and if there is a clause with only one variable x so it might look like x or x or 0 it might like x or not x or x or whatever way in which case we can fix the value of x in both sides okay either to 1 or 0 or we can say that well it cannot work whatever way it comes out to be and we can say what is the value of x so we can fix that simplify get rid of the variable x so it gives us simplification if there is a clause which has exactly two variables in its component not 3 as in the 3's had in general you might have then what we can say is either one of the variables value is fixed or they are linked to each other for example let's say we have this we know that x should be negation of y okay so what we can do is that replace all the y's by not x throughout note that this replacement in phi 1 and phi 2 might be different because even though they have the same variables they might have slightly different negations etc okay here it might be for example x or not y or 0 so in this case x is equal to not y here x equal to not not y and so on so linking might be different but in both cases both sides y can be dropped so we drop it that is a simplification when we drop it of course we have to update the px ij's because not px ij has to carry the information about whatever we did to y so what we update each px ij is we multiply px ij by p y i prime j prime that is if x is i and j in the two parts what will be the y values of y in the two parts i prime j prime may not be the same if i and j are the same it might be linked differently whatever it is we put that information in there and update px ij two clauses share two of the literals but the third literal might be different if they are third all three are similar they are similar clauses we won't worry about it yet okay but if they have two variables which they share the third is different then what we can say is that z is linked to w y for example if x or y and x prime y prime are both same x prime is x y prime is y then we know that z must be the same as y w value of z must be same as the blue similarly we can consider all four cases x is equal to not x y equal to y prime or vice versa or both are negations etc in all four cases we can see that z is linked to the blue so we can get rid of one variable and we can update the p main or px ij as in the previous cases this is a little bit complicated now suppose x appears in at least four dissimilar clauses in this case what we can we will do is we will branch on the value of x the aim is that if we have four dissimilar clauses when which x appears we can get enough what we can say is simplification by just branching on x and we can do certain things so what things we can do of course we branch on being consistent on s1 s2 whatever we have given so we branch on that value and because x appears in four clauses these are not same because otherwise it would have been taken in previous cases let's say x is zero we get these two linked whatever the value of x in the four clauses you can link the other two variables so you can drop four of them for the future consideration x is always dropped so you are essentially dropping five variables by branching and we will see later that that's good enough for us so that's what we do if x appears in at least four dissimilar clauses okay suppose that also doesn't happen then we are looking for some other kind of things where we can simplify so suppose we have some set of variables i and j i is not too big j is not too big so that the variables from i either they appear in clauses only involving j and other clauses don't involve any i values from my okay in that case we can do some simplifications three cases we will consider j is of size 1 2 or 3 so we will consider j is of size 1 in which case we consider we don't drop the x here at this point we won't branch on x but we do some simplifications on the px i j's based on what is the value of x we will just do that simplification but not drop x at this point but doing that simplification we can show that we can get rid of all the variables in i j if it has two variables one of which appears outside with something else we can again do the simplification there the simplification will be by branching on x and if j is of size 3 and certain other patterns are there we can do another simplification so I won't go into that but we can do the simplifications there the next case will be suppose there is a clause which has at most at least four neighbors what do we mean by a neighbor so x y z and if we have x prime these two are neighbors because they have a common variable so suppose some clause has at least four neighbors we can then say that in some sense if none of the previous simplifications apply then the four neighbors must be of one of these five forms okay so if it is in any of these forms we can again get rid of lots of variables by doing some simplifications as we said earlier I won't go into those details okay so that gives us lots of simplifications in this case if we have only those five possibilities what we will do is we will branch either on both x and x prime being 0 on the two sides sorry let me call it triple prime because I use the x prime somewhere else so x triple prime being 0 or we know that at least one of x and x triple prime is 1 we branch on those possibilities so there will be nine possibilities there but based on that what we can simplify how many variables we can delete we do it on that basis okay in the first case when x and x prime are 0 0 we can get rid of four variables and when in the other cases we can get rid of seven variables okay but there are nine branches but we can get rid of seven variables what we can show is that that's good enough for the aim which we are having so that what these were the simplifications as I talked some of them are a bit messy simplification now case two if none of those case one cases apply that means we don't have many neighbors no variable appears in many of the causes and so on and so forth that's nice to us because then we can consider the causes as our text let's say and if there is a neighbor we make an edge no clause has more than three neighbors which is good because now the graph is very sparse and what we can do is there is a result by some other work in graph theory that these graphs which are like three regular graphs they are like three regular graphs we can do some partition such that we have some causes here some here you have edges the number of edges crossing is not too many it is something like one by six of the number of crosses we can get rid of all the variables directly in this because some of them still might have whatever because we have three neighbors we can show that on the other side you have at most two otherwise we can do some switching and these two sites are more or less equal so if we branch on all these variables which are in the common side both sides that will be about one sixth of the number of clauses number of clauses won't be more than two by three of the number of variables in this case we can show that that gives us a good handle we don't have to branch too much we do two independent stuff now the good thing in the independent stuff is that we can just carry over some of the techniques we don't need to branch too many in particular what you can show is that this part if you only considered a case two part gives that many leaves four to the four n by 21 plus smaller factors okay that's not too bad compared to four to the n okay so that was one thing so we do all those simplifications etc so we count number of leaves now and in case one there were few cases where we branched and in case two as we said we have done that branching and what we can show is that in case one case we consider what alpha because we are looking for something like how much many leaves you have of alpha to the n what alpha is good enough for whatever cases so you we consider alphas which are good enough for all the cases case one five we did branching this alpha is good enough case one six we did branching these alpha is good enough case one seven this branching is good enough this is good enough you see what is the worst case this one comes out to be the worst case and that gives us the complexity of the algorithm that the number of leaves in our three search trees at most 1.3298 today and whether we can improve it by looking at more critical cases or not I don't know at this point but we can possibly do it so that's the main result which we have okay so I conclude my talk we gave us faster algorithm than before not only we give maximum hamming distance because we give that polynomial we can consider all possible distances what what how many of pairs are there like that okay so it is general more general than the hamming distance calculation the algorithm style is similar to some of the earlier algorithm style just that we did a different analysis main thing which we did was that keep the clauses similar in all the branches that made us able to do some simplifications more easily count what's going on okay that's all from my side now the cases which we did what we did is that if you look at each of these cases last one is was easy because and that was just the branching and we just calculated it by using no one that doesn't have any closed form that's just saying that hey how many branches you have so we have formulas like TR is equal to let's say I can't remember what the formula came out to be but something like this came out and then we just see which are works what alpha works that's all okay