1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Dmitriy789 [7]
3 years ago
12

Recursive definitions for subsets of binary strings. About Give a recursive definition for each subset of the binary strings. A

string x should be in the recursively defined set if and only if x has the property described.
(a) The set S consists of all strings with an even number of 1's.
(b) The set S is the set of all binary strings that are palindromes. A string is a palindrome if it is equal to its reverse. For example, 0110 and 11011 are both palindromes.
Computers and Technology
1 answer:
Masteriza [31]3 years ago
8 0

Answer:

this program was written in JAVA

Explanation:

import java.util.Scanner;

public class RecursivePalindromeJava

{

public static boolean checkPalindrome(String str)

{

if(str.length() == 0 || str.length() == 1)

return true;

if(str.charAt(0) == str.charAt(str.length() - 1))

return checkPalindrome(str.substring(1, str.length() - 1));

return false;

}

public static void main(String[]args)

{

Scanner sc = new Scanner(System.in);

System.out.println("Please enter a string : ");

String strInput = sc.nextLine();

if(checkPalindrome(strInput))

{

System.out.println(strInput + " is palindrome");

}

else

{

System.out.println(strInput + " not a palindrome");

}

sc.close();

)

)

You might be interested in
To make your brand colors stand out, it is important to implement what with your color scheme?
qaws [65]

Answer:

All of the above

Explanation:

It's better to have a pattern of colors than one single color in you color scheme.

6 0
3 years ago
Read 2 more answers
Small text files used by websites to track potential customers' visits to a website and provide details on how the customer has
andrew-mc [135]
They are called cookies. 
3 0
4 years ago
Which feature of spreadsheet software will make it easier for you to find the average number of calls made per hour for each emp
max2010maxim [7]

Answer:

It's formula and functions

Explanation:

6 0
4 years ago
What do devices provide? A.data to be processed B. Software code C.text and images only D.results of processing.
VikaD [51]

A is the correct answer!

8 0
3 years ago
What is a Hyperlink. Give three characteristics of a hyperlink ​
Vitek1552 [10]

Answer:

link destination ("href" pointing to a URL)

link label.

link title.

link target.

link class or link id.

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • CompX Inc. is an online retailer of electronic products, including laptops and tablets. The company is known for its unique appr
    15·1 answer
  • If an appliance consumes 500 W of power and is left on for 5 hours, how much energy is used over this time period?
    5·1 answer
  • Which of the following is an acronym? A.RAM B.Every Good Boy Does Fine. C.association D.mnemonic device
    13·1 answer
  • The name of a Variable effects its value<br><br> True<br><br> False
    7·1 answer
  • A meeting of the quality team June is nervous about suggesting ideas because he is not sure he understands why they are qualifie
    6·2 answers
  • At the ________ level of an organization, functional managers focus on monitoring and controlling operational-level activities a
    14·2 answers
  • 50 POINTS &amp; A FOLLOW!
    11·2 answers
  • Inside which command group will a user find the ability to configure Outlook rules used to organize a mailbox?
    10·1 answer
  • In python,
    15·1 answer
  • Indonesia is planning to move its capital from Jakarta to the island of Borneo in the hope that the burden of congestion, regula
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!