TutorMe homepage

SIGN IN

Start Free Trial

Shashi Ranjan P.

Computer Science Engineering Student at IIT Kharagpur, Tutoring experience of 3 years

Tutor Satisfaction Guarantee

Calculus

TutorMe

Question:

Q : Find the particular solution of y’’ + y = (x^2) + x + 3

Shashi Ranjan P.

Answer:

The given DE in operator form can be written as (D^2 + 1)y = (x^2) + x + 3: =) y = ((1/(D^2 + 1) )*(x^2 + x + 3)) 1 in ascending powers of f(D) =) y = ((1 + D^2)^-1)*(x^2 + x + 3): =) y = (1 -D^2 + D^4 ::::::)(x^2 + x + 3): =) y = (x^2 + x + 3) -(D^2(x^2 + x + 3)) + D^4(x^2 + x + 3) ::::::: =) y = x^2 + x + 3 2 + 0 ::::::: =)y = x^2 + x + 1; is the required particular solution of the given DE.

C Programming

TutorMe

Question:

Consider two strings, then the might have some common sequence of characters among them. Like 'ababcdce' and 'bebedffe' have a common sequence of 'bbde' .The sequence in which these four characters appear in both the strings is same. So, this is the Longest common sub sequence (LCS ) of the two strings. Write a C code to do the same. Input : size of both strings and the two strings . Output : Length of LCS and the LCS string like 'bbde' in our sample case.

Shashi Ranjan P.

Answer:

#include<stdio.h> #include<malloc.h> #include<stdlib.h> #include<string.h> void lcs(int **a,int **b,char *x,char *y,int m,int n); void printlcs(int **b,int **a,char *x,int i,int j); int main() { int m,n,i,j; scanf("%d %d",&m,&n); int **a,**b; char *x,*y; x=(char *)malloc((m+1)*sizeof(char)); y=(char *)malloc((n+1)*sizeof(char)); scanf("%s",x); scanf("%s",y); a=(int **)malloc((m+1)*sizeof(int *)); for(i=0;i<=m;i++) { *(a+i)=(int *)malloc((n+1)*sizeof(int)); } b=(int **)malloc((m+1)*sizeof(int *)); for(i=0;i<=m;i++) { *(b+i)=(int *)malloc((n+1)*sizeof(int)); } for(i=0;i<=n;i++) { a[0][i]=0; } for(i=0;i<=m;i++) { a[i][0]=0; } lcs(a,b,x,y,m,n); printf(" \n %d\n",a[m][n]); printlcs(b,a,x,m,n); } void lcs(int **a,int **b,char *x,char *y,int m,int n) { int i,j; for(i=1;i<=m;i++) { for(j=1;j<=n;j++) { if(x[i-1]==y[j-1]) { a[i][j]=a[i-1][j-1] +1; b[i][j]=2; } else { if(a[i-1][j]>a[i][j-1]) { a[i][j]=a[i-1][j]; b[i][j]=3; } else { a[i][j]=a[i][j-1]; b[i][j]=1; } } } } } void printlcs(int **b,int **a,char *x,int i,int j) { if((i==1||j==1)&&(a[i][j]==2)) { printf("%c",x[i-1]); return; } else { switch(b[i][j]) { case 1: printlcs(b,a,x,i,j-1); break; case 2 : printlcs(b,a,x,i-1,j-1); printf("%c",x[i-1]); break; case 3 : printlcs(b,a,x,i-1,j); break; } } }

Physics

TutorMe

Question:

Q : Is friction really always necessary for pure rolling of any body ? (Rotational Dynamics)

Shashi Ranjan P.

Answer:

Ans : Strictly speaking No, friction is not always necessary for pure rolling . Suppose a rigid ball (ideal one) is given a rational speed (angular) of 'w' and its center is given a linear velocity 'v' such that ' v = w * r ' (r : radius of the ball) , then the point of contact of ball and ground (rough one) will not have a slipping tendency with respect to ground. So, no friction will act on the ball and the ball will continue it's pure rolling motion. And all this will be valid as long as there does not exists any rolling friction.

Send a message explaining your

needs and Shashi Ranjan will reply soon.

needs and Shashi Ranjan will reply soon.

Contact Shashi Ranjan

Ready now? Request a lesson.

Start Session

FAQs

What is a lesson?

A lesson is virtual lesson space on our platform where you and a tutor can communicate.
You'll have the option to communicate using video/audio as well as text chat.
You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.

How do I begin a lesson?

If the tutor is currently online, you can click the "Start Session" button above.
If they are offline, you can always send them a message to schedule a lesson.

Who are TutorMe tutors?

Many of our tutors are current college students or recent graduates of top-tier universities
like MIT, Harvard and USC.
TutorMe has thousands of top-quality tutors available to work with you.

Made in California

© 2018 TutorMe.com, Inc.