Unique SAT ={$\phi$| $\phi$ has unique satisfying assignment } represents an important class of computational problems. I recall reading that P=NP iff Unique SAT is in P (I don't remember where I read it. Notice that Unique SAT is CoNP-hard and Unique SAT= SAT\ Double SAT where Double Sat={$\phi$| $\phi$ has two or more satisfying assignments}) I'm looking  for an efficiently computable function $f(s_n)= \phi$  such that formula $\phi$ is uniquely satisfied by assignment $s_n$ where $n$ is the number of variables.Also, Can $f$ be made a bijection?   Edit 1: Input is a binary string $s_n$, output is a 3SAT formula in CNF.Basically, I'm looking for an efficient algorithm that computes $f$. Ideally, such algorithm would allows us to construct hard instances for Unique SAT.EDIT 2: I'm seeking an algorithm that is able to generate all uniquely staisfiable instances not just the easy cases given so far.
Constructing uniquely satisfiable formulas
cc.complexity theory;unique solution
If I understand your question correctly, you're looking for ways to generate lots of non-trivial uniquely satisfiable 3SAT instances.There's a tension between your desire to find a way to generate all uniquely satisfiable instances and your desire to find a way to generate hard uniquely satisfiable instances.  For the moment let's ignore your uniqueness condition. Then I know there has been some work on this problem, e.g., see this paper by Achlioptas et al.  You might think that they proceed by generating random clauses and discarding the clauses that are inconsistent with a randomly chosen but fixed assignment.  But although this method will in principle generate every satisfiable instance (with some probability), it tends to produce instances that are easy to solve.  To get hard instances, Achlioptas et al. adopt the approach of picking some known hard problem and generating instances based on that.  I suspect that a similar dilemma will arise for uniquely satisfiable instances.  My guess is that a randomized method that generates every uniquely satisfiable instance with some probability will tend to produce easily solved instances.  If you want hard instances, your best bet is probably to pick some cryptographic problem (where the unique solution is the cryptographic secret, e.g., a factorization) and generate instances based on that.