## calculation of Transitive Closure

This question is not from homework, but rather as preparation for the test:

The calculation of place-in is a calculation in which the algorithm does not need space beyond the output size (beyond beyond a fixed space complexity). Show how, given a graph (E, V = G), the transitive closure can be calculated in-place in the calculation of G * = (V, E *)

I tried to represent the graph using a adjacency matrix. what is the next step?

## If BMM can be solved in T(n) = Ω(n2) time then the transitive closure can be solved in O(T(|V |))

If BMM can be solved in T(n) = Ω(n2) time then the transitive closure can be solved in O(T(|V |)) time. I didn’t understand the proof in the context of building edges. I Add the proof

Thanks

## Prove that (if $R$ is set-like, then its transitive closure is set-like) implies the axiom of replacement

This is exercise I.9.6 from Kunen’s Set Theory (2011). $$R$$ is set-like on the class $$A$$ iff $$y \in A$$ implies $$\{ x \in A: xRy \}$$ is a set. I am not so sure about this, but it is implied that this can be done without using the axiom of choice.

The obvious choice of $$R$$ is $$xRy$$ iff $$x= F(y)$$, however what I am most unsure of is how to pick the class such that it cointains all of $$A$$ and all of $$F(A)$$. I think the simple $$A \cup F(A)$$ doesn’t work because for an $$x \in A$$, $$F(F(x))$$ may not be a set and hence $$R$$ wouldn’t be set-like. This reasoning seems to apply to any set $$B$$, since $$A \cup F(A)$$ must be cointained in $$B$$ in order for the transitive closure to include $$F(A)$$.

As an specific example, consider the set $$\mathbb{N}$$ of natural numbers and the formula $$\phi(x,y)$$$$y$$ is $$\mathbb{N}$$ if $$x$$ is a natural number and, $$y$$ is $$\{w: w=w\}$$ if $$x$$ is $$\mathbb{N}$$“. Clearly while $$R$$ is set-like in $$\mathbb{N}$$, it is not set-like in $$\mathbb{N} \cup F(\mathbb{N})$$, and in general I can’t modify $$\phi(x,y)$$ as to exclude the $$x$$s in $$F(A)$$, as they may be part of $$A$$, too.

So, how can we prove it?

## How to include external javascript files that rely on jquery but did not wrap in closure

Hello I am including an external javascript file using

drupal_add_js('https://wwww.sample.com/js/sample.js', 'external'); 

But this file is using jquery but didnt wrap it with

## Closure implementation

I have custom cell of tableview which is used as header as well as normal cell.

In custom cell I have this properties

public var btnReplyTappedClousre:((CommentCell) -> (Void))? public var btnBulbTappedClousre:((CommentCell) -> (Void))? public var btnOtherReplyTapped:((CommentCell) -> (Void))? 

And Call it with

@IBAction func btnReplyTapped(_ sender: Any) {     self.btnReplyTappedClousre?(self) }  //--------------------------------------------------------------------------------  @IBAction func btnBulbTapped(_ sender: Any) {     self.btnBulbTappedClousre?(self) }  //--------------------------------------------------------------------------------  @IBAction func btnViewPreviousReplyTapped(_ sender: Any) {     self.btnOtherReplyTapped?(self) } 

In view Controller i have implemented that closure

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {     let cell =  tableView.dequeueReusableCell(withIdentifier: StoryBoard.Cells.CommentCell, for: indexPath) as! CommentCell     cell.isForHeaderCell = false     cell.btnReplyTappedClousre = {[weak self] (cell) in         self?.btnViewAllReplyTapped(cell)     }     cell.btnBulbTappedClousre = {[weak self] (cell) in         self?.btnBulbTapped(cell)     }     return cell }  func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {     let cell =  tableView.dequeueReusableCell(withIdentifier: StoryBoard.Cells.CommentCell) as! CommentCell     cell.isForHeaderCell = true      cell.btnReplyTappedClousre = {[weak self] (cell) in         self?.btnViewAllReplyTapped(cell)     }     cell.btnBulbTappedClousre = {[weak self] (cell) in         self?.btnBulbTapped(cell)     }      cell.btnReplyTappedClousre = {[weak self] (cell) in         self?.btnReplyTapped(cell)     }       return cell  } 

Is there any better way to do it ? Or can i improve it ?

## Is the integral closure of a polynomial ring a UFD?

Let C(x) be the field of rational functions over the complex numbers and F a finite extension of C(x). Suppose B is the integral closure of C[x] (the ring of polynomials over C). Is B always a Unique Factorization Domain (UFD)?

## Finding the interior and closure of set $A \subset \mathbb{R}^2$

I am trying to determine the interior and closure of the following set $$A := \{ (x,y) \in \mathbb{R}^2 : |x| \geq |y|\}$$ and would like to vertify my answer

For every $$(x,y) \in A$$ we can find an $$\epsilon$$-neighbourhood that is completely contained in $$A$$ unless $$|x| = |y|$$. If we let $$a \in A$$ such that $$a = (x,x)$$ and $$\epsilon > 0$$ then $$b = (x-\epsilon, x+\epsilon) \in B_{\epsilon}(a)$$ and $$b\notin A$$ which means $$A^{°} := \{ (x,y) \in A : |x| \neq |y| \}$$

The set $$A$$ is closed, which means $$A = \overline{A}$$. I tried to show that $$\mathbb{R}^2 \setminus A$$ is open, but I am having trouble finding an $$\epsilon$$ such that $$c \in \mathbb{R}^2 \setminus A \ \text{and} \ d = (x,y) \in B_{\epsilon}(c) \Longrightarrow |x| < |y| \ \text{and} \ d \in \mathbb{R}^2 \setminus A$$

Note: we are using the Euclidean metric on $$\mathbb{R}^2$$