Homework

Homework Questions? Ask a Tutor for Answers ASAP

Ask an Expert,
Get an Answer ASAP!

For LogicPro only Implement the pattern-matching algorithm…

Customer Question
For LogicPro onlyImplement the pattern-matching...
For LogicPro onlyImplement the pattern-matching algorithm shown in the pseudo-code listing below. The 'slist' object in the pseudo-code is a map data structure. Most listings of this algorithm's use arrays, however, a map is much more space efficient.Your map data structure is your dynamic-array, converted to a map that takes pairs as data members. Also, the map is implemented as a hash-table. The midterm contained a hash-table section that handled unique-string combinations. For this map, design your hashing function to handle 'unique strings' of length 1 thru 8.This algorithm expects unique strings of length 1 (the lower ascii table). Test your implementation using a range of text strings and patterns. For testing purposes, assume the strings are unique and you do not need to check for uniqueness.A second test would be to test unique strings of length > 1. Note that a unique string is a string that contains unique characters not present in other strings. For example: , , are unique strings of length 3, while ,, are not unique.See algorithms below for pseudo-code. Also, the uploaded sample code for Rabin-Karp (RabinKarp.cpp), has a bug in the implementation: sometimes it finds a match, and sometimes it doesn't. It should always find it, as it's a character-by-character crawler. Part 2 of this assignment is to fix bug, so it finds it in all cases.Algorithm Position(c, s, t)
1 for o = len(t)+1 to 1 dec o
2 f = true
3 for i = 0 to len(s) step i
4 it = o - len(s) - 1 + i
5 if it >= 0 and s[i] != t[it]
6 f = false
7 it = o - len(s) - 1
8 if f == true and (it<=0 or t[it-1] ne c)
9 return len(t) - o + 1
10 return -1Algorithm BadShift(p)
1 for x = 0 to len(p)-1 step 1
2 slist[p[x]] = len(p) - x - 1Algorithm GoodShift(k)
1 b = ""
2 for i = 0 to len(k) step 1
3 slist[len(b)] = Position(k[len(k) - 1 - i],b,k)
4 b = k[len(k) - 1 - i] + b
5 return slistAlgorithm Search(t,p)
1 g = GoodShift(p)
2 b = BadShift(p)
3 while i < len(t) - len(p) + 1
4 j = len(p)
5 while j > 0 && p[j-1] == t[i+j-1]
6 j -= 1
7 if j > 0
8 bs = b[t[i+j-1]]
9 gs = g[len(p)-j]
10 if bs > gs
11 i += bs
12 else
13 i += gs
14 else
15 return i
16 return -1Algorithm Test()
1 target = "block of text ..."
2 pattern = "some pattern"
3 Search(target,pattern)
Submitted: 5 months ago.Category: Homework
Show More
Show Less
Ask Your Own Homework Question
Answered in 2 hours by:
3/16/2018
Tutor: LogicPro, Engineer replied 5 months ago
LogicPro
LogicPro, Engineer
Category: Homework
Satisfied Customers: 13,507
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
Verified

Hi,

Welcome

Thank you for asking me. Hope you are doing well.

Zip all files; upload the zipped file to http://wikisend.com and post download link here.

Ask Your Own Homework Question
Was this answer helpful?

How JustAnswer works

step-image
Describe your issueThe assistant will guide you
step-image
Chat 1:1 with a tutorLicensed Experts are available 24/7
step-image
100% satisfaction guaranteeGet all the answers you need
Ask Scott Your Own Question
Scott
Scott
Scott, MIT Graduate
Category: Homework
Satisfied Customers: 3,040
3,040 Satisfied Customers
Experience: MIT Graduate (Math, Programming, Science, and Music)

Scott is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here.

DianeDallas, TX

< Previous | Next >

Meet the Experts:

LogicPro

LogicPro

Engineer

13,507 satisfied customers

Expert in Java C++ C C# VB Javascript Design SQL HTML

Manal Elkhoshkhany

Manal Elkhoshkhany

Tutor

4,556 satisfied customers

More than 5000 online tutoring sessions.

Linda_us

Linda_us

Finance, Accounts & Homework Tutor

3,138 satisfied customers

Post Graduate Diploma in Management (MBA)

Chris M.

Chris M.

M.S.W. Social Work

2,699 satisfied customers

Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)

F. Naz

F. Naz

Chartered Accountant

2,194 satisfied customers

Experience with chartered accountancy

Bizhelp

Bizhelp

CPA

1,887 satisfied customers

Bachelors Degree and CPA with Accounting work experience

Seanna

Seanna

Tutor

1,781 satisfied customers

3,000+ satisfied customers, all topics, A+ work

< Previous | Next >

Related Homework Questions
For LogicPro only I will have my C++ data structure exam
For LogicPro onlyHI, I will have my C++ data structure exam around 5:30 pm. Can you help me with it? I think most question just need to be written in pseudo code. So it shouldn't take too hard to do i… read more
LogicPro
LogicPro
Engineer
13,507 satisfied customers
For LogicPro Only: Create an array based lookup table for
For LogicPro Only: Create an array based lookup table for the following 48 C++ reserved words: asm class double friend new return switch union auto const else goto operator short template unsigned bre… read more
LogicPro
LogicPro
Engineer
13,507 satisfied customers
For LogicPro only Purpose: Use the Hashtable Data Structure
For LogicPro onlyPurpose: Use the Hashtable Data StructureUsing your DynamicArray and your Doubly-Linked list, create a Hashtable. The Hashtable is a DynamicArray of LinkedLists. The LinkedLists handl… read more
LogicPro
LogicPro
Engineer
13,507 satisfied customers
The next structure you will investigate is the table and its
The next structure you will investigate is the Hash table and its methods implemented in pseudo code when linked lists are used to handle collisions.The task this week is to complete the pseudo code f… read more
LogicPro
LogicPro
Engineer
13,507 satisfied customers
Write a program that accepts an input string, and outputs a
Write a program that accepts an input string, and outputs a SHA256 hash with a predefined pattern for that input string. You will define your own format for the hashes. HASH MINER by meInput Text: Joe… read more
LogicPro
LogicPro
Engineer
13,507 satisfied customers
Logic pro are you available to write a python scripts that
Hi logic pro are you available to write a python scripts that interacts with wordpress site. i can provide you with the enecessry details. I have attached the instruction and the skeleton code.… read more
LogicPro
LogicPro
Engineer
13,507 satisfied customers
Weekly tasks or assignments (Individual or Group Projects)
Weekly tasks or assignments (Individual or Group Projects) will be due by Monday and late submissions will be assigned a late penalty in accordance with the late penalty policy found in the syllabus. … read more
LogicPro
LogicPro
Engineer
13,507 satisfied customers
my code : public class minku{ public static void main(String
my code : public class minku{ public static void main(String []args){ int a; for(a=1507000004;a<=1551496083;a+=1){ double b=(double)a/1000000; int integer=(int)b; double c=(1000000*b-1000000*(int)b… read more
ATLProg
ATLProg
Sr Software Engineer
Master\u0027s Degree
46 satisfied customers
In java script i have number string arrays like a=1,2,3,4,5b=4,4,
In java script i have number string arrays like a=1,2,3,4,5 b=4,4,4,4,4 c=15,15,15,15,15, d=35,35,35,35,35 e=50,50,50,50,50 I want combine first string a like (aaaaaa) any number of times then string … read more
Expert
Expert
Write a java program to impement a prefix tree. Start with
Write a java program to impement a prefix tree. Start with the skeleton below: import java.util*; public class Node extends HashMap{ private int data; public static void insert(Node p,String s,int d){… read more
Raj
Raj
SAP ABAP Consultant
Master\u0027s Degree
27 satisfied customers
Write your instructor a program that gives him the three characters
Write your instructor a program that gives him the three characters asked for. The matrix to use is: A B C D E F G H I J 1 3 N 1 M 4 R X 5 F N 2 N V T 5 K Q F M 3 P 3 9 K 1 Y R 4 V T F 3 4 3 3 9 V 4 Y… read more
John
John
Software Engineer
509 satisfied customers
Write a program to read a message from keyboard, and an integer
Write a program to read a message from keyboard, and an integer number between 1 and 10 for CODING. Prompt user if the numbers is not valid. Modify each of the characters and digits based on the follo… read more
ATLProg
ATLProg
Sr Software Engineer
Master\u0027s Degree
46 satisfied customers
Create a flowchart, and show the processing that will take
Create a flowchart, and show the processing that will take place for the implementation of a hash structure. Include the hash function separately. Write the code that will create a hash algorithm and … read more
jatechexpert
jatechexpert
Master\u0027s Degree
1 satisfied customers
COMP122Week 7 iLabThe focus of this lab is on using strings.
COMP122 Week 7 iLab The focus of this lab is on using strings. You will have an opportunity to work with both C style strings and the string data type. This lab also gives you an opportunity to use wh… read more
LogicPro
LogicPro
Engineer
13,507 satisfied customers
Problem Description Create the following methods, and then
Problem Description Create the following methods, and then call them from main method sequentially. Note 1: Some of the methods may need one or more auxiliary methods. In such a case you should split … read more
LogicPro
LogicPro
Engineer
13,507 satisfied customers
Hi Scott, Sorry to bother you again but I have another
Hi Scott, Sorry to bother you again but I have another JAVA program to get solved and was wondering if you could be of any assistance. If you have time I would like to forward it to you again.... Let … read more
Scott
Scott
MIT Graduate
Master's Degree
3,040 satisfied customers
Have a JAVA program that needs to be developed that simply ...
Have a JAVA program that needs to be developed that simply encrypts then decrypts a message.… read more
Chris Parker
Chris Parker
Senior Associate (Software Engineer)
Master's Degree
76 satisfied customers
Hello,I need some help with my program (using array of
Hello, I need some help with my program (using array of strings in C++). I need to be helped within 24 hours. Thank you!… read more
Fermat
Fermat
Master's Degree
17 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x