Fix an ambient finite set $X$, without loss of generality $X = \{1, \ldots, |X|\}$. You wish to identify some subset $B \subseteq X$ hidden to you. You can gain information about the subset as follows: you can choose any subset $C \subseteq X$, and you receive the number $|B \cap C|$.  In terms of $|X|$ (and possibly $|B|$), what is the least number of queries required to determine $B$? How about a special case, for example when $|B| \leq \log_2(|X|)$?    Some observations:   The case $|B| = 1$ allows binary search, and thus can be done in $\lceil\log_2(|X|)\rceil$. Already for $|B| = 2$, a way with fewer than $2\log_2(|X|) + C$ queries is not clear to me (although I can see how to do $\frac32 \log_2(|X|) + C$ on average). Trivially $|X|$ queries always suffices: just start with $C = X$ and remove one element for each query. This question was inspired by a recent Google Code Jam problem: there your query consists of a bit for each element of $X$, and you get $|X| - |B|$ bits back. However, in the Google Code Jam problem the returned bits are still ordered correctly, just with missing values. This allows you to match up the responses of multiple queries. Then $\lfloor\log_2(|B|) + 1\rfloor$ queries suffice.
I pick a random subset $S$ of $\{1,\ldots,N\}$, and you have to guess what it is. After each guess $G$, I tell you the number of elements in $G \cap S$. How many guesses do you need?
Storing Images in DB - Yea or Nay? So I'm using an app that stores images heavily in the DB. What's your outlook on this? I'm more of a type to store the location in the filesystem, than store it directly in the DB.  What do you think are the pros/cons? Using 'do' unnecessarily Often when I am on a flight, nearly every sentence I hear from the flight attendants contains an unnecessary emphatic auxiliary in its main clause; that is, an altogether unnecessary do or unnecessary emphasis on other auxiliaries:     We do apologise for the delay, which was due to technical issues, but we will be taking off shortly, and we do hope you enjoy the flight. We do ask you to fasten you seatbelt now, and if you do have any questions, we do hope you won't hesitate to ask us.   What is the purpose of this constant emphasis? My guess is it's supposed to somehow elevate their language to a higher register, but why do flight attendants in particular seem so fond of this? Is there a term that means "a person who enjoys learning"? This term might be used to describe someone who:   Is a self-motivated learner. Is curious, wants to understand many things.   I understand the term "philosopher" might be a good fit, in terms of its root words, however, the general population has an inconsistent understanding of this term, so I am looking for a more precise term. 3 questions about Algebraic Geometry and Zariski topology I've read this exercise on my book, but I don't know how to prove it... Can someone help me?  Let X $\subseteq \mathbb{A}^n$ be an algebraic set, and $f, g:X\rightarrow k$ two regular functions.  a) If we see $f$ as an application $X \rightarrow \mathbb{A}^1(k)$, prove that $f$ is continuous in the Zariski topology.  b) If $X$ is irreducible and an open $U \subseteq X$ exists such that $f_{|U} = g_{|U}$, prove that $f=g$.  c) Give an example of $X, f$ and $g$ such that $f \neq g$ but $f_{|U} = g_{|U}$ in an open $U \subseteq X$.  Thank you!  For b) I have been able to prove that:  Let E be the subset where $f = g$ so E is closed (Why? I know that $E = (f,g)^{-1}(\Delta_{k})$ but... why is $(\Delta_{k})$ closed?). So $U \subseteq E \Rightarrow \bar{U} \subseteq \bar{E}=E$ (beacuse E is closed) $\Rightarrow X \subseteq E$, because $\bar{U}=X \Rightarrow E = X$ and $f=g$ in X. Is it possible to interrupt spellcasting? As  suggests, there seems to be a hole in the D&amp;D Basic rules.  Maybe.  The rules for readying an action state:     When the trigger occurs, you can either take your reaction right after the trigger finishes or ignore the trigger.   This seems to imply that it is impossible to interrupt a spell in 5e.  If you set your trigger to be "I attack the Wizard when he casts a spell", then you make the attack after the spell has been cast.  Does this mean that spells can no longer be interrupted in combat like they could be in previous editions? Show that the LU decomposition of matrices of the form $\left[\begin{smallmatrix}0& x\\0 & y\end{smallmatrix}\right]$ is not unique How can I show that every matrix of the form $\begin{bmatrix}0&amp; x\\0 &amp; y\end{bmatrix}$ has an $LU$ factorization and that even if $L$ is unit lower triangular there is not a unique factorization?  I am completely stuck. Any ideas would be greatly appreciated RX 590 IN Blender and Cycles Render I don't know why, but I cant render anything in CUDA and OptiX but OpenCL work fine. I cant use Cycles render because it's very laggy. I have newest  version of Blender and an RX 590 Red Dragon 8gb. Why does that happen?  How can I turn on my gpu? I am running Ubuntu 14.04 and Notepad++ 6.6.4 (through WINE)  Under the 'Run' tab, I clicked on "Launch in Firefox" , but nothing happened   I uninstalled Notepad++ and WINE, then shutdown. I re-installed Notepad++ and WINE and still have the same problem.   Does anyone know what the problem is? Show that quotient rings are not isomorphic I've been given a homework problem that requires me to show that the rings $\mathbb{C}[x,y]/(y - x^2)$ and $\mathbb{C}[x,y]/(xy-1)$ are not isomorphic.    This is my attempt at a solution:  For $\mathbb{C}[x,y]/(y - x^2)$, we can parametrize in the following way: $x = t$ and $y = t^2$. Then this ring is isomorphic to $\mathbb{C}[t]$.  For $\mathbb{C}[x,y]/(xy-1)$, we can parametrize $x = t$ and $ y = 1/t$. Then this is isomorphic to $\mathbb{C}[t, 1/t]$.   But $\mathbb{C}[t, 1/t]$ is not isomorphic to $\mathbb{C}[t]$.  Am I on the right track? If not, any helpful hints? I know you can export the asset as a PSD and open it in Photoshop. Is there a more seamless way?  Update:  I'm an idiot.  Someone else created the logo, and the shadow was it's own layer on multiply and not a normal drop shadow effect. It's said that if  is spared in  quest, he remains in the Dawnstar sanctuary and can be later hired as a follower. Well I did just that and I can't find him anywhere. Where exactly is he? Does he disappear and only reappear after some other moment in the game? I'm working in C, and I have to concatenate a few things.  Right now I have this:  message = strcat("TEXT ", var);  message2 = strcat(strcat("TEXT ", foo), strcat(" TEXT ", bar));   Now if you have experience in C I'm sure you realize that this gives you a segmentation fault when you try to run it. So how do I work around that? How should I determine whether a deck is legal in a particular format? I have a list of cards for a deck I want to build or buy. What should I do to check whether that deck is legal in a particular format (Standard, for example)? What is the distance a creature or player can travel if they have multiple types of movement speeds? How to make crs transformation of a QgsVectorLayer? I need to transform QgsVectorLayers in python from one crs into another crs. By googling I found the following solution (), which works for points only:  crsSrc = QgsCoordinateReferenceSystem(4326)    # WGS 84 crsDest = QgsCoordinateReferenceSystem(32633)  # WGS 84 / UTM zone 33N xform = QgsCoordinateTransform(crsSrc, crsDest) pt1 = xform.transform(QgsPoint(18,5))   Is there a way to make a crs transformation of an entire layer? How to check that a cubic polynomial is irreducible? Conky Widgets are Opening in their Own Windows I just upgraded to 16.04 and I'm getting all my customization set up again, but it seems that most Conky widgets are opening in their own window, instead of just appearing on the Desktop; although some are working correctly.  For example:  LSD (working properly):    Seamod (not working, opening in own window):    Since it's not affecting every single widget, I assume it could be an issue with the conkyrc with the widgets that aren't working, but this also never happened in 14.04 so I wasn't sure if maybe there was some compatibility issue in 16.04. My Google-fu has failed me in finding a solution.  If anyone can point me in the right direction, it would be much appreciated! :) I've installed Ubuntu 13.04 two times on my PC. Each on a different partition. I would like to delete the one which I'm not using. How would I do that? Suddenly unable to screenshot- Do not have permission to save files in the location where screenshots are stored Recieved the error:  'Your screenshot could not be saved. You don't have permission to save files in the location where screenshots are stored.' with OS X Yosemite.  I opened terminal and tried directing the screenshots to save on my desktop:  Brigittes-Air:~ eggsalad$ defaults read com.apple.screencapture location 2017-01-06 03:04:47.765 defaults[17729:1947540]  The domain/default pair of (com.apple.screencapture, location) does not exist  So I tried writing and:  Brigittes-Air:~ eggsalad$ defaults write com.apple.screencapture location ~/Desktop 2017-01-06 03:05:08.652 defaults[17742:1948451] Could not write domain com.apple.screencapture; exiting  I'm not sure where the screenshots are being stored if the location does not exist. Ideas?  EDIT  I ran something else and got a different response, but defaults are still unchanged.   Brigittes-Air:~ eggsalad$ defaults write com.apple.screencapture location/Users/eggsalad/Desktop killall SystemUIServer  2017-01-06 03:22:35.444 defaults[18265:2001767] Unexpected argument SystemUIServer; leaving defaults unchanged.  2nd EDIT  Result of:  ls -l ~/Library/Preferences/com.apple.screencapture.plist  was:   ls: /Users/eggsalad/Library/Preferences/com.apple.screencapture.plist: No such file or directory What are complex numbers, actually?