Topology and basis for topology and their size comparison - topology

I don't know the solution about this problem
Consider following topologies on R
T1: standard topology
T2: the finite complement topology
T3: its basis consists of all sets of (a, b]
T4: its basis consists of all sets of (-∞, a)
Determine, for each of the topologies, which of the others is contained in it

Related

Is there a way to not select a reference category for logistic regression in SPSS?

When doing logistic regression in SPSS, is there a way to remove the reference category in the independent variables so they're all compared against each other equally rather than against the reference category?
When you have a categorical predictor variable, the most fundamental way to encode it for modeling, sometimes referred to as the canonical representation, is to use a 0-1 indicator for each level of the predictor, where each case takes on a value of 1 for the indicator corresponding to its category, and 0 for all the other indicators. The multinomial logistic regression procedure in SPSS (NOMREG) uses this parameterization.
If you run NOMREG with a single categorical predictor with k levels, the design matrix is built with an intercept column and the k indicator variables, unless you suppress the intercept. If the intercept remains in the model, the last indicator will be redundant, linearly dependent on the intercept and the first k-1 indicators. Another way to say this is that the design matrix is of deficient rank, since any of the columns can be predicted given the other k columns.
The same redundancy will be true of any additional categorical predictors entered as main effects (only k-1 of k indicators can be nonredundant). If you add interactions among categorical predictors, an indicator for each combination of levels of the two predictors is generated, but more than one of these will also be redundant given the intercept and main effects preceding the interaction(s).
The fundamental or canonical representation of the model is thus overparameterized, meaning it has more parameters than can be uniquely estimated. There are multiple ways commonly used to deal with this fact. One approach is the one used in NOMREG and most other more recent regression-type modeling procedures in SPSS, which is to use a generalized inverse of the cross-product of the design matrix, which has the effect of aliasing parameters associated with redundant columns to 0. You'll see these parameters represented by 0 values with no standard errors or other statistics in the SPSS output.
The other way used in SPSS to handle the overparameterized nature of the basic model is to reparameterize the design matrix to full rank, which involves creating k-1 coded variables instead of k indicators for each main effect, and creating interaction variables from these. This is the approach taken in LOGISTIC REGRESSION.
Note that the overall model fit and predicted values from a logistic regression (or other form of linear or generalized linear model) will be the same regardless of what choices are made about parameterization, as long as the appropriate total number of unique columns are in the design matrix. Particular parameter estimates are of course highly dependent upon the particular parameterization used, but you can derive the results from any of the valid approaches using the results from any other valid approach.
If there are k levels in a categorical predictor, there are k-1 degrees of freedom for comparing those k groups, meaning that once you'd made k-1 linearly independent or nonredundant comparisons, any others can be derived from those.
So the short answer is no, you can't do what you're talking about, but you don't need to, because the results for any valid parameterization will allow you to derive those for any other one.

How does SPSS assign factor scores for cases where underlying variables were pairwise deleted?

Here's a simplified example of what I'm trying to figure out from a report. All analyses are being run in SPSS, which I don't have and don't use (my experience is with SAS and R).
They were running a regression to predict overall meal satisfaction from food type ordered, self-reported food flavor, and self-reported food texture.
But food flavor and texture are highly correlated, so they conducted a factor analysis, found food flavor and texture load on one factor, and used the factor scores in the regression.
However, about 40% of respondents don't have responses on self-reported food texture, so they used pairwise deletion while making the factors.
My question is when SPSS calculates the factor scores and outputs them as new variables in the data set, what does it do with people who had an input for a factor that was pairwise deleted?
How does it calculate (if it calculates it at all) factor scores for those people who had a response pairwise deleted during the creation of the factors and who therefore have missing data for one of the variables?
Factor scores are a linear combination of their scaled inputs. That is, given normalized variables X1, ..., Xn, we have the following (where LaTeX formatting isn't supported and the L's indicate the loadings)
f = \sum_{i=1}^n L_i X_i
In your case n = 2. Now suppose one of the X_i is missing. How do you take a sum involving a missing value? Clearly, you cannot... unless you impute it.
I don't know what the analyst who created your report did. I suggest you ask them.

Parametrization of sparse sampling algorithms

I have a question about the parametrization of C, H and lambda in the paper: "A Sparse Sampling Algorithm for Near-Optimal Planning in Large Markov Decision Processes" (or for anyone with some general knowledge on reinforcement learning and especially lambda), in page 5.
More precisely, I do not see any indication of if the parametrizations H, C or lambda are dependent on such factors as the sparsity or distance of a reward, given the environment might have rewards within any number of steps in the future.
For example, let's assume that there is an environment that requires a string of 7 actions to reach a reward from an average starting state, and another that requires 2 actions. When planning with trees, it seems obvious that, given the usual exponential branching of the state space, C (size of the sample) and H (horizon length) should be dependent on how far removed from the current state these rewards are. For the one with 2 steps away from an average state it might be enough to have an H = 2 for example. Similarly C should be dependent on the sparsity of a reward, that is, if there are 1000 possible states and only one of them has a reward, C should be higher than if the reward would be found with every 5 states (assume multiple states give the same reward vs. a goal-oriented problem).
So the question is, are my assumptions correct, or what have I missed about sampling? Those definitions on page 5 of the linked pdf do not have any mention of any dependency on the branching factor or sparsity of rewards.
Thank you for your time.

Prim's and Kruskal's algorithm

Prim's and Kruskal's algorithm both produce the minimum spanning tree. According to the cut property, the total cost of the tree will be the same for these algorithms, but is it possible that these two algorithms give different MST with the same total cost, given that we choose it in alphabetic order when faced with multiple choices. for example, we compare max(source,dest), for edges A->B and B->C, we compare A from A->B and B from B->C.
Thank you
Assuming that your comparator handles the case where both edges are equal in cost and have the same max(source, dest) character, it will never declare any two edges equal. For there to be the possibility of multiple MSTs, at least two edges in the graph must be equal. Therefore, the MST is unique, and both Prim's and Kruskal's algorithm will return the same result.
On the other hand, if your comparator declares the edges A->B (cost 1) and A->C (cost 1) equal, than there is a possibility that the algorithms will generate different MSTs, depending on which edge they consider first (A->B or A->C).
It is definitely possible for one graph to have multiple MSTs, so long as those different representations of the MSTs have the same total weight. Otherwise, the one with the lower total weight would be the true MST and the other would no longer be an MST.
Because Prim's and Kruskal's algorithms have different steps, it is possible that they would choose different edges of the same weight during the actual traversal, yet still end with the same total weight.
However, if you add the restriction that you stated in your question (choosing the node that comes first in the alphabet) the MST for Prim's and Kruskal's should be the same tree, for each of the decisions, even if they are the same weight, would prefer the same edge for both Kruskal's and Prim's.

synchronizes-with, happens-before relation and acquire-release semantics

I need help in understanding synchronizes-with relation. The more I'm reading it an trying to understand example, the more I feel that I understand nothing. Sometimes I feel that here is it, I've got it, but after looking at another example I get confused again. Please help me to get it right.
It's said that an operation A synchronizes-with an operation B if A is a store to some atomic variable m, with release semantics, B is a load from the same variable m, with acquire semantics, and B reads the value stored by A.
It's also said that an operation A happens-before an operation B if
A is performed on the same thread as B, and A is before B in program order, or
A synchronizes-with B, or
A happens-before some other operation C, and C happens-before B
OK. If we look at this example
thread0 performs | thread1 performs
store x (release) | load x (acquire)
does store to x here synchronize-with load from x? If we do have synchronizes-with relationship here, then store to x happens before load from x, so everything what is sequenced before store to x in thread 0 happens-before load from x in thread 1. It means there is enforced ordering here. Is it right? But in this case I don't understand what does the "and B reads the value stored by A" part of definition mean? If thread 1 is faster then thread 0 it may read the old value. So what is the relationship here and is there any relationship at all? If there is no, how can I provide that relationship?
Thanks in advance.
I cannot say that I am well familiar with the terminology, but this is how I think it goes. I will use the .NET definitions for terms: "An operation has acquire semantics if other processors will always see its effect before any subsequent operation's effect. An operation has release semantics if other processors will see every preceding operation's effect before the effect of the operation itself."
There is no enforced ordering between the store and load in the example. Either one may be executed first. A synchronizes-with B when the store operation happens to be executed before load. When this happens, all operations before the store (release) are guaranteed to be executed before the operations after the load (acquire) are executed.
However, the load operation may be executed before the store. In that case A does not synchronize-with B (as the condition "and B reads the value stored by A" is not true) and so the operations after load may be executed before the operations that precede the store. The order is vague.
The release semantics guarantees that for certain value of x we will know that the operations preceding the store will be executed before we are able to load the same stored value in the second thread (and before we are able to execute the operations following the load).
Let's assume that count and flag are initialized to zero and both threads are run in parallel:
thread0:
st count, 1 (A)
st.release flag, 1 (B)
thread1:
ld.acquire flag (C)
ld count (D)
We know that A happens-before B and C happens-before D, because their order is forced by the release and acquire semantics. The order of B and C is undefined. It only becomes defined when B synchronizes-with C and then we know that A happens-before D (as A happens-before B happens-before C happens-before D).
In thread1 the count is always 1 if flag is 1. If flag is 0 the count may be either 0 or 1. We could test the flag to determine if the other thread has set the value to the count.
Without acquire and release semantics the loads and stores could be reordered and both the flag and count could be either 0 or 1 with no dependency to each other.
If we want to ensure that B happens-before C, we can use semaphores or some other wait-and-signal mechanism. In previous example we could enforce the order by busy-waiting the flag to be set.
thread1:
ld.acquire flag (C)
repeat C while flag == 0
ld count (D)