Ask Your Question

Deepak Sarma's profile - activity

2021-11-26 00:40:14 +0100 received badge  Popular Question (source)
2021-05-18 02:02:03 +0100 received badge  Notable Question (source)
2021-03-25 08:38:21 +0100 received badge  Popular Question (source)
2021-03-25 08:38:21 +0100 received badge  Notable Question (source)
2021-01-28 22:15:20 +0100 received badge  Famous Question (source)
2020-12-09 04:03:42 +0100 received badge  Notable Question (source)
2020-10-09 00:37:53 +0100 received badge  Famous Question (source)
2020-10-09 00:37:53 +0100 received badge  Notable Question (source)
2020-05-13 19:44:31 +0100 received badge  Popular Question (source)
2020-02-23 16:23:33 +0100 received badge  Notable Question (source)
2019-12-30 07:24:53 +0100 received badge  Notable Question (source)
2019-06-22 17:30:31 +0100 received badge  Popular Question (source)
2019-06-10 15:58:02 +0100 received badge  Nice Question (source)
2019-06-08 06:16:55 +0100 received badge  Notable Question (source)
2019-05-01 01:25:57 +0100 received badge  Popular Question (source)
2019-04-23 15:41:06 +0100 received badge  Nice Question (source)
2019-04-23 15:09:51 +0100 received badge  Popular Question (source)
2018-08-17 21:02:53 +0100 received badge  Popular Question (source)
2018-07-25 13:48:40 +0100 asked a question Smallest positive numerical solution of an equation in one variable

I have some functions, all of which are functions of variable $x$ but some of them may not have any positive solutions. It is known that at least one of them have a positive solution. Now I need a list of all smallest positive solutions for those functions. For example consider $f=x^2+3x+2$ and $g=2^{(5x + 1)} - 3.2^{(3x + 1)}$. Here $f$ doesn't have any positive root but $g$ has (0.792481250360578). I want a sage code like min(solve([f,x>1],x))+min(solve([g,x>1],x)) to get the list as [0.792481250360578]. Thank you in advance.

2018-07-25 08:39:42 +0100 commented answer Optimizing a function of a given matrix

Thank you for your solution. It works with that particular matrix. But it doesn't work for all matrices.

For example consider $$A=\left(\begin{array}{rrrrr} 0 & 2^{x} & 1 & 1 & 1 \ 2^{x} & 0 & 1 & 1 & 1 \ 1 & 1 & 0 & 2^{x} & 2^{x} \ 1 & 1 & 2^{x} & 0 & 2^{x} \ 1 & 1 & 2^{x} & 2^{x} & 0 \end{array}\right)$$

or

$$A=\left(\begin{array}{rrrr} 0 & 1 & 2^{x} & 1 \ 1 & 0 & 1 & 2^{x} \ 2^{x} & 1 & 0 & 1 \ 1 & 2^{x} & 1 & 0 \end{array}\right)$$

Here I get an error "cannot evaluate symbolic expression numerically"

Note: For all my matrices, it is known that the solution is at most equal to 2. So if something like min(find_root(X,0,2)+find_root(Y,0,2)) could be used, that is also enough for me.

2018-07-25 05:49:07 +0100 commented answer Optimizing a function of a given matrix

Actually, I was stuck at this step. I tried the code "solve" to solve the two systems, but I don't get numerical value from this. Again I tried "find_root" code with the interval but one of the systems (First one) does not have a solution, and so it gives a long list of errors. Therefore I cannot evaluate the minimum of all solutions (min() doesn't work). For this particular matrix, I can find it by direct calculation. But what I need a general method to get my required (numerical value) whenever I input a matrix as a function of $x$. I need something like this

X=det(A); Y=sum((~A).list()); S=solve([X,x>0],x); T=solve([Y,x>0],x); min(S+T)

This doesn't give me numerical value. Note the last step, I want sage to calculate the minimum value of the ... (more)

2018-07-24 03:12:25 +0100 received badge  Notable Question (source)
2018-07-24 03:12:25 +0100 received badge  Famous Question (source)
2018-07-23 16:50:52 +0100 asked a question Optimizing a function of a given matrix

Let us consider the $4\times 4$ symmetric matrix $$ A_x=\left(\begin{array}{rrrr} 0 & 1 & 1 & 1 \ 1 & 0 & 2^x & 2^x \ 1 & 2^x & 0 & 2^x \ 1 & 2^x & 2^x & 0 \end{array}\right) $$

Here I need to find $\min { x>0: det(A_x)=0 \, or \, ||A_x^{-1}||=0 } ,$ where by $||M||$ we mean the sum of all entries of the matrix $M.$ I'm looking for a general sage program where my input will be a matrix with entries as functions of an inderminant (like the matrix $A_x$ above) which will give me the unique $x$ corresponding to my matrix. If no such real value exists, it should result as $\infty$ Can anyone help me? Thank you in advance.

2018-07-23 07:12:52 +0100 commented question Optimal solution

Let us consider the $4\times 4$ symmetric matrix $$ A_x=\left(\begin{array}{rrrr} 0 & 1 & 1 & 1 \\ 1 & 0 & 2^x & 2^x \\ 1 & 2^x & 0 & 2^x \\ 1 & 2^x & 2^x & 0 \end{array}\right) $$

Here I need to find $\min { x>0: det(A_x)=0 \, or \, ||A_x^{-1}||=0 } ,$ where by $||M||$ we mean the sum of all entries of the matrix $M.$ If anyone helps me solving this problem using sage, this will be enough for me. Thank you

2018-07-23 06:56:51 +0100 commented question Optimal solution

Most of my functions are not rationals., For example, I have some functions like $f(x)=4.12^x-4.9^x-7.8^x+8.4^x+8.3^x-4.$ Can you please write a program that works for the two functions that I have mentioned?

2018-07-22 18:24:45 +0100 commented question Optimal solution

Actually, I need to check different kinds of functions. So I need a sage program where I can input any kind of such functions to get the result. Simply you can consider $f(x)=x^3-2x^2-2x+4.$ But a general sage program will be more helpful. Thank you.

2018-07-22 11:49:39 +0100 asked a question Optimal solution

If $f(x)$ is a given real valued function, then how to find the minimum value of $x>0$ such that either $\frac{1}{f(x)}>5$ or $f(x)=0.$ If no such $x$ exist then it should return $\infty$ as output. If anyone write the sage code for me by considering any real valued function it would be helpful for me. Thank you in advance.

2018-07-06 17:16:00 +0100 received badge  Popular Question (source)
2018-04-17 05:46:54 +0100 commented answer Pairs of graphs with same spectral radius but with different diameter and different number of edges

Thank you for the detail explanation. But what I see here we will get the graphs with same spectral radius and then we have check ourselves for graphs with different diameter and no of edges. But what to do if I want to write the program in such a way that it checks everything itself and finally give me a pair (or all such pairs) of my requirement?

2018-04-12 07:47:21 +0100 asked a question Pairs of graphs with same spectral radius but with different diameter and different number of edges

I know that graphs.cospectral_graphs() gives all pairs of graphs with same eigenvalues. But I need graphs with same spectral radius i.e. largest eigenvalue (the other eigenvalues may be different) and differing in diameter and number of edges. What to do for this? Thank you in advance.

2018-02-04 07:29:53 +0100 received badge  Popular Question (source)
2018-01-09 08:03:31 +0100 asked a question Complimentary eigenvalue of a matrix

How to obtain all the complimentary eigenvalues (also associated complimentary eigenvectors) of a given matrix. Complimentary eigenvalues and eigenvectors of a given matrix $A$ of order $n\times n$ is the solution to the following system

$x≥0_n$, $Ax−λx≥0_n$ and $⟨x, Ax−λx⟩=0$ where $x(\neq 0_n)\in R^n$

2018-01-08 09:17:55 +0100 commented answer List of all dominating sets in a graph

Thank you for your answer. But complement of an independent set is a vertex cover only for connected graph. How to include disconnected graphs here? And what about the first question, how to obtain all the dominating sets?